Struct RequestCookie
pub struct RequestCookie<'c> { /* private fields */ }
Expand description
A cookie set by a client in an HTTP request using the Cookie
header.
§Constructing a RequestCookie
To construct a cookie with only a name/value, use RequestCookie::new()
:
use biscotti::RequestCookie;
let cookie = RequestCookie::new("name", "value");
assert_eq!(cookie.to_string(), "name=value");
Implementations§
§impl<'c> RequestCookie<'c>
impl<'c> RequestCookie<'c>
pub fn new<N, V>(name: N, value: V) -> RequestCookie<'c>
pub fn new<N, V>(name: N, value: V) -> RequestCookie<'c>
Creates a new RequestCookie
with the given name
and value
.
§Example
use biscotti::RequestCookie;
let cookie = RequestCookie::new("name", "value");
assert_eq!(cookie.to_string(), "name=value");
Trait Implementations§
§impl<'c> Clone for RequestCookie<'c>
impl<'c> Clone for RequestCookie<'c>
§fn clone(&self) -> RequestCookie<'c>
fn clone(&self) -> RequestCookie<'c>
Returns a copy 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 more§impl<'c> Debug for RequestCookie<'c>
impl<'c> Debug for RequestCookie<'c>
§impl Display for RequestCookie<'_>
impl Display for RequestCookie<'_>
§impl<'c> Hash for RequestCookie<'c>
impl<'c> Hash for RequestCookie<'c>
§impl<'c> PartialEq for RequestCookie<'c>
impl<'c> PartialEq for RequestCookie<'c>
impl<'c> Eq for RequestCookie<'c>
impl<'c> StructuralPartialEq for RequestCookie<'c>
Auto Trait Implementations§
impl<'c> Freeze for RequestCookie<'c>
impl<'c> RefUnwindSafe for RequestCookie<'c>
impl<'c> Send for RequestCookie<'c>
impl<'c> Sync for RequestCookie<'c>
impl<'c> Unpin for RequestCookie<'c>
impl<'c> UnwindSafe for RequestCookie<'c>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.