[−][src]Struct carapax_session::Session
Actual session
Methods
impl<B> Session<B> where
B: SessionBackend,
[src]
B: SessionBackend,
pub async fn set<K, V>(
&'_ mut self,
key: K,
value: &'_ V
) -> Result<(), SessionError> where
K: AsRef<str>,
V: Serialize,
[src]
&'_ mut self,
key: K,
value: &'_ V
) -> Result<(), SessionError> where
K: AsRef<str>,
V: Serialize,
Sets a value for key
pub async fn get<K, O>(&'_ mut self, key: K) -> Result<Option<O>, SessionError> where
K: AsRef<str>,
O: DeserializeOwned,
[src]
K: AsRef<str>,
O: DeserializeOwned,
Gets a value for key
pub async fn expire<K>(
&'_ mut self,
key: K,
seconds: u64
) -> Result<(), SessionError> where
K: AsRef<str>,
[src]
&'_ mut self,
key: K,
seconds: u64
) -> Result<(), SessionError> where
K: AsRef<str>,
Expires a key
pub async fn remove<K>(&'_ mut self, key: K) -> Result<(), SessionError> where
K: AsRef<str>,
[src]
K: AsRef<str>,
Removes a key
Trait Implementations
Auto Trait Implementations
impl<B> !RefUnwindSafe for Session<B>
impl<B> Send for Session<B> where
B: Send,
B: Send,
impl<B> Sync for Session<B> where
B: Send,
B: Send,
impl<B> Unpin for Session<B>
impl<B> !UnwindSafe for Session<B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,