Struct tsukuyomi_session::Session
source · pub struct Session<S: RawSession> { /* private fields */ }
Expand description
An interface of session values.
Implementations§
source§impl<S> Session<S>where
S: RawSession,
impl<S> Session<S>where
S: RawSession,
sourcepub fn get<T>(&self, name: &str) -> Result<Option<T>>where
T: DeserializeOwned,
pub fn get<T>(&self, name: &str) -> Result<Option<T>>where
T: DeserializeOwned,
Retrieves a field from this session and parses it into the specified type.
sourcepub fn contains(&self, name: &str) -> bool
pub fn contains(&self, name: &str) -> bool
Returns true
if the field of specified name exists in this session.