pub trait RedisGrpc:
Send
+ Sync
+ 'static {
type SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + Sync + 'static;
// Required methods
fn command<'life0, 'async_trait>(
&'life0 self,
request: Request<CommandRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CommandResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn publish<'life0, 'async_trait>(
&'life0 self,
request: Request<PublishRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PublishResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn keys<'life0, 'async_trait>(
&'life0 self,
request: Request<KeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<KeysResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set<'life0, 'async_trait>(
&'life0 self,
request: Request<SetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SetResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'async_trait>(
&'life0 self,
request: Request<GetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with RedisGrpcServer.
Required Associated Types§
Sourcetype SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + Sync + 'static
type SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + Sync + 'static
Server streaming response type for the Subscribe method.