Struct finchers_session::Session [−][src]
#[must_use = "The value must be convert into a Future to finish the session handling."]pub struct Session<S: RawSession> { /* fields omitted */ }
A struct which manages the session value per request.
Methods
impl<S> Session<S> where
S: RawSession,
[src]
impl<S> Session<S> where
S: RawSession,
pub fn new(raw: S) -> Session<S>
[src]
pub fn new(raw: S) -> Session<S>
pub fn get(&self) -> Option<&str>
[src]
pub fn get(&self) -> Option<&str>
Get the session value if available.
pub fn set(
&mut self,
value: impl Into<String>
)
[src]
pub fn set(
&mut self,
value: impl Into<String>
)
Set the session value.
pub fn remove(&mut self)
[src]
pub fn remove(&mut self)
Annotates to remove session value to the backend.
pub fn with<R>(
self,
f: impl FnOnce(&mut Self) -> R
) -> where
R: IntoFuture<Error = Error>,
[src]
pub fn with<R>(
self,
f: impl FnOnce(&mut Self) -> R
) -> where
R: IntoFuture<Error = Error>,
Trait Implementations
impl<S: Debug + RawSession> Debug for Session<S>
[src]
impl<S: Debug + RawSession> Debug for Session<S>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<S> IntoFuture for Session<S> where
S: RawSession,
[src]
impl<S> IntoFuture for Session<S> where
S: RawSession,
type Item = ()
The item that the future may resolve with.
type Error = Error
The error that the future may resolve with.
type Future = WriteSessionFuture<S::WriteFuture>
The future that this type can be converted into.
fn into_future(self) -> Self::Future
[src]
fn into_future(self) -> Self::Future
Consumes this object and produces a future.