Struct mailpot_web::ReadableSession
source · pub struct ReadableSession {
session: OwnedRwLockReadGuard<Session, Session>,
}
Expand description
An extractor which provides a readable session. Sessions may have many readers.
Fields§
§session: OwnedRwLockReadGuard<Session, Session>
Trait Implementations§
source§impl Debug for ReadableSession
impl Debug for ReadableSession
source§impl Deref for ReadableSession
impl Deref for ReadableSession
§type Target = OwnedRwLockReadGuard<Session, Session>
type Target = OwnedRwLockReadGuard<Session, Session>
The resulting type after dereferencing.
source§impl<S> FromRequestParts<S> for ReadableSessionwhere
S: Send + Sync,
impl<S> FromRequestParts<S> for ReadableSessionwhere 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<ReadableSession, <ReadableSession as FromRequestParts<S>>::Rejection>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
ReadableSession: 'async_trait,
fn from_request_parts<'life0, 'life1, 'async_trait>( parts: &'life0 mut Parts, state: &'life1 S ) -> Pin<Box<dyn Future<Output = Result<ReadableSession, <ReadableSession as FromRequestParts<S>>::Rejection>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, ReadableSession: 'async_trait,
Perform the extraction.
Auto Trait Implementations§
impl !RefUnwindSafe for ReadableSession
impl Send for ReadableSession
impl Sync for ReadableSession
impl Unpin for ReadableSession
impl !UnwindSafe for ReadableSession
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