Struct mailpot_web::WritableSession
source · 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§
source§impl Debug for WritableSession
impl Debug for WritableSession
source§impl Deref for WritableSession
impl Deref for WritableSession
§type Target = OwnedRwLockWriteGuard<Session>
type Target = OwnedRwLockWriteGuard<Session>
The resulting type after dereferencing.
source§impl DerefMut for WritableSession
impl DerefMut for WritableSession
source§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.
source§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.
source§impl SessionMessages for WritableSession
impl SessionMessages for WritableSession
type Error = ResponseError
fn drain_messages(&mut self) -> Vec<Message>
fn add_message(&mut self, message: Message) -> Result<(), ResponseError>
Auto Trait Implementations§
impl !RefUnwindSafe for WritableSession
impl Send for WritableSession
impl Sync for WritableSession
impl Unpin for WritableSession
impl !UnwindSafe for WritableSession
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more