Trait tsukuyomi_session::Backend
source · pub trait Backend {
type Session: RawSession;
type ReadError: Into<Error>;
type ReadSession: TryFuture<Ok = Self::Session, Error = Self::ReadError>;
fn read(&self) -> Self::ReadSession;
}
Expand description
A trait representing the session backend.
Required Associated Types§
sourcetype Session: RawSession
type Session: RawSession
The type of session which will be crated by ReadSession
.
sourcetype ReadSession: TryFuture<Ok = Self::Session, Error = Self::ReadError>
type ReadSession: TryFuture<Ok = Self::Session, Error = Self::ReadError>
The type of TryFuture
that will return a Session
.
Required Methods§
sourcefn read(&self) -> Self::ReadSession
fn read(&self) -> Self::ReadSession
Creates a TryFuture
to create a Session
asynchronously.