pub struct CookieBackend { /* private fields */ }Implementations§
Source§impl CookieBackend
impl CookieBackend
Sourcepub fn plain() -> CookieBackend
pub fn plain() -> CookieBackend
Creates a CookieSessionBackend which stores the Cookie values as a raw form.
Sourcepub fn signed(key: Key) -> CookieBackend
pub fn signed(key: Key) -> CookieBackend
Creates a CookieSessionBackend which signs the Cookie values with the specified secret key.
This method is only available if the feature flag secure is set.
Sourcepub fn private(key: Key) -> CookieBackend
pub fn private(key: Key) -> CookieBackend
Creates a CookieSessionBackend which encrypts the Cookie values with the specified secret key.
This method is only available if the feature flag secure is set.
Sourcepub fn path(self, value: impl Into<Cow<'static, str>>) -> CookieBackend
pub fn path(self, value: impl Into<Cow<'static, str>>) -> CookieBackend
Sets the path of Cookie entry.
The default value is "/".
Sourcepub fn secure(self, value: bool) -> CookieBackend
pub fn secure(self, value: bool) -> CookieBackend
Sets the value of secure in Cookie entry.
The default value is true.
Sourcepub fn http_only(self, value: bool) -> CookieBackend
pub fn http_only(self, value: bool) -> CookieBackend
Sets the value of http_only in Cookie entry.
The default value is true.
Sourcepub fn domain(self, value: impl Into<Cow<'static, str>>) -> CookieBackend
pub fn domain(self, value: impl Into<Cow<'static, str>>) -> CookieBackend
Sets the value of domain in Cookie entry.
The default value is None.
Sourcepub fn same_site(self, value: SameSite) -> CookieBackend
pub fn same_site(self, value: SameSite) -> CookieBackend
Sets the value of same_site in Cookie entry.
The default value is None.
Sourcepub fn max_age(self, value: Duration) -> CookieBackend
pub fn max_age(self, value: Duration) -> CookieBackend
Sets the value of max_age in Cookie entry.
The default value is None.
Trait Implementations§
Source§impl Clone for CookieBackend
impl Clone for CookieBackend
Source§fn clone(&self) -> CookieBackend
fn clone(&self) -> CookieBackend
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CookieBackend
impl Debug for CookieBackend
Source§impl<'a> Endpoint<'a> for CookieBackend
impl<'a> Endpoint<'a> for CookieBackend
Source§type Output = (Session<CookieSession>,)
type Output = (Session<CookieSession>,)
Source§type Future = FutureResult<<CookieBackend as Endpoint<'a>>::Output, Error>
type Future = FutureResult<<CookieBackend as Endpoint<'a>>::Output, Error>
apply.Source§fn apply(&self, cx: &mut ApplyContext<'_>) -> ApplyResult<Self::Future>
fn apply(&self, cx: &mut ApplyContext<'_>) -> ApplyResult<Self::Future>
Source§fn with_output<T>(self) -> Self
fn with_output<T>(self) -> Self
Output is fixed to T.Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, E> EndpointWrapExt<'a> for Ewhere
E: Endpoint<'a>,
impl<'a, E> EndpointWrapExt<'a> for Ewhere
E: Endpoint<'a>,
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>
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>
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