Struct mailpot_web::WritableSession
pub struct WritableSession {
session: OwnedRwLockWriteGuard<Session>,
}
Expand description
An extractor which provides a writable session. Sessions may have only one writer.
Fields§
§session: OwnedRwLockWriteGuard<Session>
Trait Implementations§
§impl Debug for WritableSession
impl Debug for WritableSession
§impl Deref for WritableSession
impl Deref for WritableSession
§impl DerefMut for WritableSession
impl DerefMut for WritableSession
§fn deref_mut(&mut self) -> &mut <WritableSession as Deref>::Target
fn deref_mut(&mut self) -> &mut <WritableSession as Deref>::Target
Mutably dereferences the value.
§impl<S> FromRequestParts<S> for WritableSessionwhere
S: Send + Sync,
impl<S> FromRequestParts<S> for WritableSessionwhere S: Send + Sync,
§type Rejection = Infallible
type Rejection = Infallible
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
§fn from_request_parts<'life0, 'life1, 'async_trait>(
parts: &'life0 mut Parts,
state: &'life1 S
) -> Pin<Box<dyn Future<Output = Result<WritableSession, <WritableSession as FromRequestParts<S>>::Rejection>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
WritableSession: 'async_trait,
fn from_request_parts<'life0, 'life1, 'async_trait>( parts: &'life0 mut Parts, state: &'life1 S ) -> Pin<Box<dyn Future<Output = Result<WritableSession, <WritableSession as FromRequestParts<S>>::Rejection>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, WritableSession: 'async_trait,
Perform the extraction.