pub struct CookieBuilder { /* private fields */ }Expand description
A builder for constructing HTTP cookies with various attributes.
Implementations§
Source§impl CookieBuilder
impl CookieBuilder
Sourcepub fn secure(&mut self) -> &mut Self
pub fn secure(&mut self) -> &mut Self
Sets the secure flag for the cookie.
When set to true, the cookie will only be sent over HTTPS connections.
§Returns
- The CookieBuilder instance for method chaining.
Sourcepub fn http_only(&mut self) -> &mut Self
pub fn http_only(&mut self) -> &mut Self
Sets the HttpOnly flag for the cookie.
When set to true, the cookie will be inaccessible to JavaScript.
§Returns
- The CookieBuilder instance for method chaining.
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 moreSource§impl Debug for CookieBuilder
impl Debug for CookieBuilder
Source§impl Default for CookieBuilder
impl Default for CookieBuilder
Source§fn default() -> CookieBuilder
fn default() -> CookieBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CookieBuilder
impl RefUnwindSafe for CookieBuilder
impl Send for CookieBuilder
impl Sync for CookieBuilder
impl Unpin 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