pub struct SetCookieBuilder { /* private fields */ }Expand description
Builder for SetCookie.
Implementations§
Source§impl SetCookieBuilder
impl SetCookieBuilder
Sourcepub fn url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
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 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 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 expires<VALUE: Into<TimeSinceEpoch>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn expires<VALUE: Into<TimeSinceEpoch>>( &mut self, value: VALUE, ) -> &mut Self
Cookie expiration date, session cookie if not set
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 type.
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. If not set, the cookie will be set as not partitioned.
Trait Implementations§
Source§impl Clone for SetCookieBuilder
impl Clone for SetCookieBuilder
Source§fn clone(&self) -> SetCookieBuilder
fn clone(&self) -> SetCookieBuilder
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 SetCookieBuilder
impl RefUnwindSafe for SetCookieBuilder
impl Send for SetCookieBuilder
impl Sync for SetCookieBuilder
impl Unpin for SetCookieBuilder
impl UnsafeUnpin for SetCookieBuilder
impl UnwindSafe for SetCookieBuilder
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