Trait EventService

Source
pub trait EventService:
    Send
    + Sync
    + 'static {
    type StreamEventsStream: Stream<Item = Result<Event, Status>> + Send + 'static;

    // Required method
    fn stream_events<'life0, 'async_trait>(
        &'life0 self,
        request: Request<EventStreamRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEventsStream>, 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 EventServiceServer.

Required Associated Types§

Source

type StreamEventsStream: Stream<Item = Result<Event, Status>> + Send + 'static

Server streaming response type for the StreamEvents method.

Required Methods§

Source

fn stream_events<'life0, 'async_trait>( &'life0 self, request: Request<EventStreamRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEventsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§