Skip to main content

Sessions

Trait Sessions 

Source
pub trait Sessions:
    Send
    + Sync
    + 'static {
    type AttachSessionStream: Stream<Item = Result<AttachResponse, Status>> + Send + 'static;
    type ExecStream: Stream<Item = Result<ExecResponse, Status>> + Send + 'static;

    // Required methods
    fn create_session<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CreateSessionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Session>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_session<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetSessionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Session>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_sessions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListSessionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ListSessionsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_session<'life0, 'async_trait>(
        &'life0 self,
        request: Request<UpdateSessionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Session>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_session<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DeleteSessionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn heartbeat_session<'life0, 'async_trait>(
        &'life0 self,
        request: Request<HeartbeatSessionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Session>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn attach_session<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<AttachRequest>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AttachSessionStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exec<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ExecRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ExecStream>, 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 SessionsServer.

Required Associated Types§

Source

type AttachSessionStream: Stream<Item = Result<AttachResponse, Status>> + Send + 'static

Server streaming response type for the AttachSession method.

Source

type ExecStream: Stream<Item = Result<ExecResponse, Status>> + Send + 'static

Server streaming response type for the Exec method.

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Implementors§