Trait Store
pub trait Store:
Send
+ Sync
+ 'static {
// Required methods
fn range<'life0, 'async_trait>(
&'life0 self,
request: Request<RangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RangeResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
request: Request<PutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn batch_put<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchPutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchPutResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn batch_delete<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchDeleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchDeleteResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn compare_and_put<'life0, 'async_trait>(
&'life0 self,
request: Request<CompareAndPutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompareAndPutResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn delete_range<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteRangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteRangeResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with StoreServer.
Required Methods§
fn range<'life0, 'async_trait>(
&'life0 self,
request: Request<RangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RangeResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn range<'life0, 'async_trait>(
&'life0 self,
request: Request<RangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RangeResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Range gets the keys in the range from the key-value store.
fn put<'life0, 'async_trait>(
&'life0 self,
request: Request<PutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
request: Request<PutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PutResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Put puts the given key into the key-value store.
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
BatchGet atomically get values by the given keys from the key-value store.
fn batch_put<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchPutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchPutResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn batch_put<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchPutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchPutResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
BatchPut atomically puts the given keys into the key-value store.
fn batch_delete<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchDeleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchDeleteResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn batch_delete<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchDeleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchDeleteResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
BatchDelete atomically deletes the given keys and its associating values from the key-value store.
fn compare_and_put<'life0, 'async_trait>(
&'life0 self,
request: Request<CompareAndPutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompareAndPutResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn compare_and_put<'life0, 'async_trait>(
&'life0 self,
request: Request<CompareAndPutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompareAndPutResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
CompareAndPut atomically puts the value to the given updated value if the current value == the expected value.
fn delete_range<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteRangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteRangeResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_range<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteRangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteRangeResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
DeleteRange deletes the given range from the key-value store.