Skip to main content

SessionAPI

Trait SessionAPI 

Source
pub trait SessionAPI: BaseClient {
    // Required methods
    fn create_session(
        &self,
    ) -> impl Future<Output = Result<Response<CreateSessionResponse>, Error>> + Send;
    fn get_sessions<'a>(&'a self) -> GetSession<'a, Self>
       where Self: Sized;
    fn subscribe_chat(
        &self,
        session_key: &SessionKey,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn unsubscribe_chat(
        &self,
        session_key: &SessionKey,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn subscribe_donation(
        &self,
        session_key: &SessionKey,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn unsubscribe_donation(
        &self,
        session_key: &SessionKey,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn subscribe_subscription(
        &self,
        session_key: &SessionKey,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn unsubscribe_subscription(
        &self,
        session_key: &SessionKey,
    ) -> impl Future<Output = Result<(), Error>> + Send;
}

Required Methods§

Source

fn create_session( &self, ) -> impl Future<Output = Result<Response<CreateSessionResponse>, Error>> + Send

Source

fn get_sessions<'a>(&'a self) -> GetSession<'a, Self>
where Self: Sized,

Source

fn subscribe_chat( &self, session_key: &SessionKey, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn unsubscribe_chat( &self, session_key: &SessionKey, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn subscribe_donation( &self, session_key: &SessionKey, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn unsubscribe_donation( &self, session_key: &SessionKey, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn subscribe_subscription( &self, session_key: &SessionKey, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn unsubscribe_subscription( &self, session_key: &SessionKey, ) -> impl Future<Output = Result<(), Error>> + 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§