Trait Cookie

Source
pub trait Cookie:
    Debug
    + Display
    + Sealed {
    // Required methods
    fn name(&self) -> &str;
    fn value(&self) -> &str;
    fn domain(&self) -> Option<&str>;
    fn path(&self) -> Option<&str>;
    fn max_age(&self) -> Option<Duration>;
    fn http_only(&self) -> bool;
    fn secure(&self) -> bool;
    fn same_site(&self) -> Option<SameSite>;
}
Expand description

Cookies in this crate implement this trait.

Required Methods§

Source

fn name(&self) -> &str

Get the name of this cookie.

Source

fn value(&self) -> &str

Get the value of this cookie.

Source

fn domain(&self) -> Option<&str>

Get the Domain, if set.

Source

fn path(&self) -> Option<&str>

Get the Path, if set.

Source

fn max_age(&self) -> Option<Duration>

Get the Max-Age, if set.

Source

fn http_only(&self) -> bool

Get if the HttpOnly attribute was on this cookie.

Source

fn secure(&self) -> bool

Get if the Secure attribute was on this cookie.

Source

fn same_site(&self) -> Option<SameSite>

Get the SameSite, if set.

Implementors§