pub struct CookieParamBuilder { /* private fields */ }Expand description
Builder for CookieParam.
Implementations§
Source§impl CookieParamBuilder
impl CookieParamBuilder
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.
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.
Sourcepub fn build(&self) -> Result<CookieParam, CookieParamBuilderError>
pub fn build(&self) -> Result<CookieParam, CookieParamBuilderError>
Trait Implementations§
Source§impl Clone for CookieParamBuilder
impl Clone for CookieParamBuilder
Source§fn clone(&self) -> CookieParamBuilder
fn clone(&self) -> CookieParamBuilder
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 CookieParamBuilder
impl RefUnwindSafe for CookieParamBuilder
impl Send for CookieParamBuilder
impl Sync for CookieParamBuilder
impl Unpin for CookieParamBuilder
impl UnsafeUnpin for CookieParamBuilder
impl UnwindSafe for CookieParamBuilder
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