pub struct Session<T>(pub T);Expand description
Session extractor: decrypts the jerrycan_session cookie into T.
Absent/invalid cookie → 401. Requires the Auth extension to be registered.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: DeserializeOwned + Send> FromRequest for Session<T>
impl<T: DeserializeOwned + Send> FromRequest for Session<T>
async fn from_request(ctx: &mut RequestCtx) -> Result<Self>
Auto Trait Implementations§
impl<T> Freeze for Session<T>where
T: Freeze,
impl<T> RefUnwindSafe for Session<T>where
T: RefUnwindSafe,
impl<T> Send for Session<T>where
T: Send,
impl<T> Sync for Session<T>where
T: Sync,
impl<T> Unpin for Session<T>where
T: Unpin,
impl<T> UnsafeUnpin for Session<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Session<T>where
T: UnwindSafe,
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