pub struct CookieBuilder { /* private fields */ }Expand description
Builder for Cookie.
Implementations§
Source§impl CookieBuilder
impl CookieBuilder
Sourcepub fn expires<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn expires<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
Cookie expiration date as the number of seconds since the UNIX epoch. The value is set to -1 if the expiry date is not set. The value can be null for values that cannot be represented in JSON (±Inf).
Sourcepub fn http_only<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn http_only<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
True if cookie is http-only.
Sourcepub fn secure<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn secure<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
True if cookie is secure.
Sourcepub fn session<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn session<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
True in case of session cookie.
Sourcepub fn same_site<VALUE: Into<CookieSameSite>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn same_site<VALUE: Into<CookieSameSite>>( &mut self, value: VALUE, ) -> &mut Self
Cookie SameSite type.
Sourcepub fn priority<VALUE: Into<CookiePriority>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn priority<VALUE: Into<CookiePriority>>( &mut self, value: VALUE, ) -> &mut Self
Cookie Priority
Sourcepub fn source_scheme<VALUE: Into<CookieSourceScheme>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn source_scheme<VALUE: Into<CookieSourceScheme>>( &mut self, value: VALUE, ) -> &mut Self
Cookie source scheme type.
Sourcepub fn source_port<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn source_port<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
Sourcepub fn partition_key<VALUE: Into<CookiePartitionKey>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn partition_key<VALUE: Into<CookiePartitionKey>>( &mut self, value: VALUE, ) -> &mut Self
Cookie partition key.
Sourcepub fn partition_key_opaque<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn partition_key_opaque<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
True if cookie partition key is opaque.
Trait Implementations§
Source§impl Clone for CookieBuilder
impl Clone for CookieBuilder
Source§fn clone(&self) -> CookieBuilder
fn clone(&self) -> CookieBuilder
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 CookieBuilder
impl RefUnwindSafe for CookieBuilder
impl Send for CookieBuilder
impl Sync for CookieBuilder
impl Unpin for CookieBuilder
impl UnsafeUnpin for CookieBuilder
impl UnwindSafe for CookieBuilder
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