[−][src]Struct carapax_session::Session
Actual session available in context
Methods
impl<S> Session<S> where
S: SessionStore,
[src]
S: SessionStore,
pub fn get<O>(
&self,
key: &str
) -> Box<dyn Future<Item = Option<O>, Error = Error> + Send> where
O: DeserializeOwned + Send + 'static,
[src]
&self,
key: &str
) -> Box<dyn Future<Item = Option<O>, Error = Error> + Send> where
O: DeserializeOwned + Send + 'static,
Get value of key
If key not exists, None is returned
pub fn set<I>(
&self,
key: &str,
val: &I
) -> Box<dyn Future<Item = (), Error = Error> + Send> where
I: Serialize,
[src]
&self,
key: &str,
val: &I
) -> Box<dyn Future<Item = (), Error = Error> + Send> where
I: Serialize,
Set key to hold the given value
pub fn expire(
&self,
key: &str,
seconds: usize
) -> Box<dyn Future<Item = (), Error = Error> + Send>
[src]
&self,
key: &str,
seconds: usize
) -> Box<dyn Future<Item = (), Error = Error> + Send>
Set a timeout on key
After the timeout has expired, the key will automatically be deleted
pub fn del(&self, key: &str) -> Box<dyn Future<Item = (), Error = Error> + Send>
[src]
Remove the specified key
Trait Implementations
Auto Trait Implementations
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Erased for T
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,