_cef_cookie_manager_t

Struct _cef_cookie_manager_t 

Source
#[repr(C)]
pub struct _cef_cookie_manager_t { pub base: cef_base_ref_counted_t, pub visit_all_cookies: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, visitor: *mut _cef_cookie_visitor_t) -> c_int>, pub visit_url_cookies: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, url: *const cef_string_t, includeHttpOnly: c_int, visitor: *mut _cef_cookie_visitor_t) -> c_int>, pub set_cookie: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, url: *const cef_string_t, cookie: *const _cef_cookie_t, callback: *mut _cef_set_cookie_callback_t) -> c_int>, pub delete_cookies: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, url: *const cef_string_t, cookie_name: *const cef_string_t, callback: *mut _cef_delete_cookies_callback_t) -> c_int>, pub flush_store: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, callback: *mut _cef_completion_callback_t) -> c_int>, }
Expand description

Structure used for managing cookies. The functions of this structure may be called on any thread unless otherwise indicated.

NOTE: This struct is allocated DLL-side.

Fields§

§base: cef_base_ref_counted_t

Base structure.

§visit_all_cookies: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, visitor: *mut _cef_cookie_visitor_t) -> c_int>

Visit all cookies on the UI thread. The returned cookies are ordered by longest path, then by earliest creation date. Returns false (0) if cookies cannot be accessed.

§visit_url_cookies: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, url: *const cef_string_t, includeHttpOnly: c_int, visitor: *mut _cef_cookie_visitor_t) -> c_int>

Visit a subset of cookies on the UI thread. The results are filtered by the given url scheme, host, domain and path. If |includeHttpOnly| is true (1) HTTP-only cookies will also be included in the results. The returned cookies are ordered by longest path, then by earliest creation date. Returns false (0) if cookies cannot be accessed.

§set_cookie: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, url: *const cef_string_t, cookie: *const _cef_cookie_t, callback: *mut _cef_set_cookie_callback_t) -> c_int>

Sets a cookie given a valid URL and explicit user-provided cookie attributes. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ‘;’ character is disallowed within the cookie value attribute) and fail without setting the cookie if such characters are found. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the cookie has been set. Returns false (0) if an invalid URL is specified or if cookies cannot be accessed.

§delete_cookies: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, url: *const cef_string_t, cookie_name: *const cef_string_t, callback: *mut _cef_delete_cookies_callback_t) -> c_int>

Delete all cookies that match the specified parameters. If both |url| and |cookie_name| values are specified all host and domain cookies matching both will be deleted. If only |url| is specified all host cookies (but not domain cookies) irrespective of path will be deleted. If |url| is NULL all cookies for all hosts and domains will be deleted. If |callback| is non- NULL it will be executed asnychronously on the UI thread after the cookies have been deleted. Returns false (0) if a non-NULL invalid URL is specified or if cookies cannot be accessed. Cookies can alternately be deleted using the Visit*Cookies() functions.

§flush_store: Option<unsafe extern "C" fn(self_: *mut _cef_cookie_manager_t, callback: *mut _cef_completion_callback_t) -> c_int>

Flush the backing store (if any) to disk. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the flush is complete. Returns false (0) if cookies cannot be accessed.

Trait Implementations§

Source§

fn clone(&self) -> _cef_cookie_manager_t

Returns a duplicate 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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

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.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.