Skip to main content

SessionService

Trait SessionService 

Source
pub trait SessionService:
    Debug
    + Send
    + Sync {
    // Provided methods
    fn create_session(
        &self,
        _req: CreateSessionRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Session>>> + Send { ... }
    fn delete_session(
        &self,
        _req: DeleteSessionRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<()>>> + Send { ... }
    fn update_session(
        &self,
        _req: UpdateSessionRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Session>>> + Send { ... }
    fn get_session(
        &self,
        _req: GetSessionRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Session>>> + Send { ... }
    fn list_sessions(
        &self,
        _req: ListSessionsRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<ListSessionsResponse>>> + Send { ... }
    fn list_operations(
        &self,
        _req: ListOperationsRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<ListOperationsResponse>>> + Send { ... }
    fn get_operation(
        &self,
        _req: GetOperationRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<Operation>>> + Send { ... }
    fn cancel_operation(
        &self,
        _req: CancelOperationRequest,
        _options: RequestOptions,
    ) -> impl Future<Output = Result<Response<()>>> + Send { ... }
}
Available on crate feature session-service only.
Expand description

Defines the trait used to implement super::client::SessionService.

Application developers may need to implement this trait to mock client::SessionService. In other use-cases, application developers only use client::SessionService and need not be concerned with this trait or its implementations.

Services gain new RPCs routinely. Consequently, this trait gains new methods too. To avoid breaking applications the trait provides a default implementation of each method. Most of these implementations just return an error.

Provided Methods§

Source

fn create_session( &self, _req: CreateSessionRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Session>>> + Send

Source

fn delete_session( &self, _req: DeleteSessionRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send

Source

fn update_session( &self, _req: UpdateSessionRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Session>>> + Send

Source

fn get_session( &self, _req: GetSessionRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Session>>> + Send

Source

fn list_sessions( &self, _req: ListSessionsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListSessionsResponse>>> + Send

Source

fn list_operations( &self, _req: ListOperationsRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<ListOperationsResponse>>> + Send

Source

fn get_operation( &self, _req: GetOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<Operation>>> + Send

Source

fn cancel_operation( &self, _req: CancelOperationRequest, _options: RequestOptions, ) -> impl Future<Output = Result<Response<()>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§