Plugin

Trait Plugin 

Source
pub trait Plugin:
    Send
    + Sync
    + 'static {
    type EventStreamStream: Stream<Item = Result<HostToPlugin, Status>> + Send + 'static;

    // Required method
    fn event_stream<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<PluginToHost>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::EventStreamStream>, 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 PluginServer.

Required Associated Types§

Source

type EventStreamStream: Stream<Item = Result<HostToPlugin, Status>> + Send + 'static

Server streaming response type for the EventStream method.

Required Methods§

Source

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

Implementors§