pub struct CookieBackend { /* private fields */ }Expand description
A Backend using a Cookie entry for storing the session data.
Implementations§
Source§impl CookieBackend
impl CookieBackend
Sourcepub fn signed(secret_key: Key) -> Self
pub fn signed(secret_key: Key) -> Self
Create a new CookieBackend that signs the cookie entry with the specified Key.
Sourcepub fn private(secret_key: Key) -> Self
pub fn private(secret_key: Key) -> Self
Create a new CookieBackend that encrypts the cookie entry with the specified Key.
Sets the name of Cookie entry to be used for storing the session data.
The default value is "tsukuyomi-session".
Sourcepub fn builder(
self,
builder: impl Fn(CookieBuilder) -> CookieBuilder + Send + Sync + 'static,
) -> Self
pub fn builder( self, builder: impl Fn(CookieBuilder) -> CookieBuilder + Send + Sync + 'static, ) -> Self
Sets the functions for modifying the saved Cookie entry.
Trait Implementations§
Source§impl Backend for CookieBackend
impl Backend for CookieBackend
Source§type ReadSession = ReadSession
type ReadSession = ReadSession
The type of
TryFuture that will return a Session.Source§fn read(&self) -> Self::ReadSession
fn read(&self) -> Self::ReadSession
Creates a
TryFuture to create a Session asynchronously.Source§impl Clone for CookieBackend
impl Clone for CookieBackend
Source§fn clone(&self) -> CookieBackend
fn clone(&self) -> CookieBackend
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CookieBackend
impl !RefUnwindSafe for CookieBackend
impl Send for CookieBackend
impl Sync for CookieBackend
impl Unpin for CookieBackend
impl !UnwindSafe for CookieBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more