Trait Cursor

Source
pub trait Cursor:
    Send
    + Sync
    + 'static {
    type AttachStream: Stream<Item = Result<CursorEvent, Status>> + Send + 'static;

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

Required Associated Types§

Source

type AttachStream: Stream<Item = Result<CursorEvent, Status>> + Send + 'static

Server streaming response type for the Attach method.

Required Methods§

Source

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

Subscribe to a workspace’s cursor events.

Implementors§