pub struct Session { /* private fields */ }
Available on crate feature
session
only.Expand description
A session for the current request.
Implementations§
source§impl Session
impl Session
sourcepub fn remove(&self, key: &str) -> Option<Value>
pub fn remove(&self, key: &str) -> Option<Value>
Removes a key from the session, returning the value at the key if the key was previously in the session.
sourcepub fn remove_as<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
pub fn remove_as<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
Removes a value and deserialize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)