pub struct MiddlewareErrorsServiceStickyCookie {
pub http_only: Option<bool>,
pub max_age: Option<i64>,
pub name: Option<String>,
pub path: Option<String>,
pub same_site: Option<String>,
pub secure: Option<bool>,
}
Expand description
Cookie defines the sticky cookie configuration.
Fields§
§http_only: Option<bool>
HTTPOnly defines whether the cookie can be accessed by client-side APIs, such as JavaScript.
max_age: Option<i64>
MaxAge defines the number of seconds until the cookie expires. When set to a negative number, the cookie expires immediately. When set to zero, the cookie never expires.
name: Option<String>
Name defines the Cookie name.
path: Option<String>
Path defines the path that must exist in the requested URL for the browser to send the Cookie header. When not provided the cookie will be sent on every request to the domain. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value
same_site: Option<String>
SameSite defines the same site policy. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
secure: Option<bool>
Secure defines whether the cookie can only be transmitted over an encrypted connection (i.e. HTTPS).
Implementations§
Source§impl MiddlewareErrorsServiceStickyCookie
impl MiddlewareErrorsServiceStickyCookie
Sourcepub fn builder() -> MiddlewareErrorsServiceStickyCookieBuilder<((), (), (), (), (), ())>
pub fn builder() -> MiddlewareErrorsServiceStickyCookieBuilder<((), (), (), (), (), ())>
Create a builder for building MiddlewareErrorsServiceStickyCookie
.
On the builder, call .http_only(...)
(optional), .max_age(...)
(optional), .name(...)
(optional), .path(...)
(optional), .same_site(...)
(optional), .secure(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of MiddlewareErrorsServiceStickyCookie
.
Trait Implementations§
Source§impl Clone for MiddlewareErrorsServiceStickyCookie
impl Clone for MiddlewareErrorsServiceStickyCookie
Source§fn clone(&self) -> MiddlewareErrorsServiceStickyCookie
fn clone(&self) -> MiddlewareErrorsServiceStickyCookie
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for MiddlewareErrorsServiceStickyCookie
impl Default for MiddlewareErrorsServiceStickyCookie
Source§fn default() -> MiddlewareErrorsServiceStickyCookie
fn default() -> MiddlewareErrorsServiceStickyCookie
Source§impl<'de> Deserialize<'de> for MiddlewareErrorsServiceStickyCookie
impl<'de> Deserialize<'de> for MiddlewareErrorsServiceStickyCookie
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for MiddlewareErrorsServiceStickyCookie
impl JsonSchema for MiddlewareErrorsServiceStickyCookie
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl PartialEq for MiddlewareErrorsServiceStickyCookie
impl PartialEq for MiddlewareErrorsServiceStickyCookie
Source§fn eq(&self, other: &MiddlewareErrorsServiceStickyCookie) -> bool
fn eq(&self, other: &MiddlewareErrorsServiceStickyCookie) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for MiddlewareErrorsServiceStickyCookie
Auto Trait Implementations§
impl Freeze for MiddlewareErrorsServiceStickyCookie
impl RefUnwindSafe for MiddlewareErrorsServiceStickyCookie
impl Send for MiddlewareErrorsServiceStickyCookie
impl Sync for MiddlewareErrorsServiceStickyCookie
impl Unpin for MiddlewareErrorsServiceStickyCookie
impl UnwindSafe for MiddlewareErrorsServiceStickyCookie
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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