Struct soup::Cookie

source ·
#[repr(transparent)]
pub struct Cookie { /* private fields */ }

Implementations§

source

pub fn as_ptr(&self) -> *mut SoupCookie

Return the inner pointer to the underlying C value.

source

pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const *const SoupCookie ) -> &'a Self

Borrows the underlying C value.

source

pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut *mut SoupCookie ) -> &'a mut Self

Borrows the underlying C value mutably.

source

pub fn new( name: &str, value: &str, domain: &str, path: &str, max_age: i32 ) -> Cookie

source

pub fn applies_to_uri(&mut self, uri: &Uri) -> bool

source

pub fn domain_matches(&mut self, host: &str) -> bool

source

pub fn domain(&mut self) -> Option<GString>

source

pub fn expires(&mut self) -> Option<DateTime>

source

pub fn is_http_only(&mut self) -> bool

source

pub fn name(&mut self) -> Option<GString>

source

pub fn path(&mut self) -> Option<GString>

source

pub fn same_site_policy(&mut self) -> SameSitePolicy

source

pub fn is_secure(&mut self) -> bool

source

pub fn value(&mut self) -> Option<GString>

source

pub fn set_domain(&mut self, domain: &str)

source

pub fn set_expires(&mut self, expires: &DateTime)

source

pub fn set_http_only(&mut self, http_only: bool)

source

pub fn set_max_age(&mut self, max_age: i32)

source

pub fn set_name(&mut self, name: &str)

source

pub fn set_path(&mut self, path: &str)

source

pub fn set_same_site_policy(&mut self, policy: SameSitePolicy)

source

pub fn set_secure(&mut self, secure: bool)

source

pub fn set_value(&mut self, value: &str)

source

pub fn parse(header: &str, origin: Option<&Uri>) -> Option<Cookie>

Trait Implementations§

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Cookie> for Value

source§

fn from(o: Cookie) -> Self

Converts to this type from the input type.
§

type ParamSpec = ParamSpecBoxed

§

type SetValue = Cookie

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, Cookie>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

fn cmp(&self, other: &Cookie) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

fn partial_cmp(&self, other: &Cookie) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

fn static_type() -> Type

Returns the type identifier of Self.

Auto Trait Implementations§

Blanket Implementations§

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

type Value = T

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> Rwhere F: Fn(&<T as PropertyGet>::Value) -> R,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.