Struct finchers_session::redis::RedisBackend [−][src]
pub struct RedisBackend { /* fields omitted */ }The instance of SessionBackend which uses Redis.
Methods
impl RedisBackend[src]
impl RedisBackendpub fn new(client: Client) -> RedisBackend[src]
pub fn new(client: Client) -> RedisBackendCreate a new RedisSessionBackend from the specified Redis client.
pub fn key_prefix(
self,
prefix: impl Into<String>
) -> RedisBackend[src]
pub fn key_prefix(
self,
prefix: impl Into<String>
) -> RedisBackendSet the prefix string used in the key name when stores the session value to Redis.
The default value is "finchers-session"
Set the name of Cookie entry which stores the session id.
The default value is "session-id"
pub fn timeout(self, timeout: Duration) -> RedisBackend[src]
pub fn timeout(self, timeout: Duration) -> RedisBackendSet the timeout of session value.
Trait Implementations
impl Debug for RedisBackend[src]
impl Debug for RedisBackendfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for RedisBackend[src]
impl Clone for RedisBackendfn clone(&self) -> RedisBackend[src]
fn clone(&self) -> RedisBackendReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'a> Endpoint<'a> for RedisBackend[src]
impl<'a> Endpoint<'a> for RedisBackendtype Output = (Session<RedisSession>,)
The inner type associated with this endpoint.
type Future = ReadFuture
The type of value which will be returned from apply.
fn apply(&self, cx: &mut ApplyContext) -> ApplyResult<Self::Future>[src]
fn apply(&self, cx: &mut ApplyContext) -> ApplyResult<Self::Future>Perform checking the incoming HTTP request and returns an instance of the associated Future if matched. Read more
fn with_output<T>(self) -> Self where
Self: Endpoint<'a, Output = T>,
T: Tuple, [src]
fn with_output<T>(self) -> Self where
Self: Endpoint<'a, Output = T>,
T: Tuple, Add an annotation that the associated type Output is fixed to T.
fn wrap<W>(self, wrapper: W) -> <W as Wrapper<'a, Self>>::Endpoint where
W: Wrapper<'a, Self>, [src]
fn wrap<W>(self, wrapper: W) -> <W as Wrapper<'a, Self>>::Endpoint where
W: Wrapper<'a, Self>, Converts self using the provided Wrapper.
Auto Trait Implementations
impl Send for RedisBackend
impl Send for RedisBackendimpl Sync for RedisBackend
impl Sync for RedisBackend