[][src]Struct reqwest::cookie::Cookie

pub struct Cookie<'a>(_);

A single HTTP cookie.

Methods

impl Cookie<'static>[src]

pub fn new<N, V>(name: N, value: V) -> Self where
    N: Into<Cow<'static, str>>,
    V: Into<Cow<'static, str>>, 
[src]

Construct a new cookie with the given name and value.

impl<'a> Cookie<'a>[src]

pub fn name(&self) -> &str[src]

The name of the cookie.

pub fn value(&self) -> &str[src]

The value of the cookie.

pub fn http_only(&self) -> bool[src]

Returns true if the 'HttpOnly' directive is enabled.

pub fn secure(&self) -> bool[src]

Returns true if the 'Secure' directive is enabled.

pub fn same_site_lax(&self) -> bool[src]

Returns true if 'SameSite' directive is 'Lax'.

pub fn same_site_strict(&self) -> bool[src]

Returns true if 'SameSite' directive is 'Strict'.

pub fn path(&self) -> Option<&str>[src]

Returns the path directive of the cookie, if set.

pub fn domain(&self) -> Option<&str>[src]

Returns the domain directive of the cookie, if set.

pub fn max_age(&self) -> Option<Duration>[src]

Get the Max-Age information.

pub fn expires(&self) -> Option<SystemTime>[src]

The cookie expiration time.

Trait Implementations

impl<'a> Debug for Cookie<'a>[src]

Auto Trait Implementations

impl<'a> Send for Cookie<'a>

impl<'a> Unpin for Cookie<'a>

impl<'a> Sync for Cookie<'a>

impl<'a> UnwindSafe for Cookie<'a>

impl<'a> RefUnwindSafe for Cookie<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err