pub trait SubscriptionService:
Send
+ Sync
+ 'static {
type SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + 'static;
type SubscribeStaticStream: Stream<Item = Result<SubscribeStaticResponse, Status>> + Send + 'static;
// Required methods
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SubscribeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_static<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeStaticRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStaticStream>, 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 SubscriptionServiceServer.
Required Associated Types§
Sourcetype SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + 'static
type SubscribeStream: Stream<Item = Result<SubscribeResponse, Status>> + Send + 'static
Server streaming response type for the Subscribe method.
Sourcetype SubscribeStaticStream: Stream<Item = Result<SubscribeStaticResponse, Status>> + Send + 'static
type SubscribeStaticStream: Stream<Item = Result<SubscribeStaticResponse, Status>> + Send + 'static
Server streaming response type for the SubscribeStatic method.
Required Methods§
Sourcefn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SubscribeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<SubscribeRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
One client’s ordered topic feeds, with atomic interest updates.
Sourcefn subscribe_static<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeStaticRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStaticStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_static<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeStaticRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStaticStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Server-streaming stream over a fixed topic list, for gRPC-Web clients.