#[repr(C)]pub struct _cef_preference_registrar_t {
pub base: cef_base_scoped_t,
pub add_preference: Option<unsafe extern "C" fn(self_: *mut _cef_preference_registrar_t, name: *const cef_string_t, default_value: *mut _cef_value_t) -> c_int>,
}Expand description
Structure that manages custom preference registrations.
NOTE: This struct is allocated DLL-side.
Fields§
§base: cef_base_scoped_tBase structure.
add_preference: Option<unsafe extern "C" fn(self_: *mut _cef_preference_registrar_t, name: *const cef_string_t, default_value: *mut _cef_value_t) -> c_int>Register a preference with the specified |name| and |default_value|. To avoid conflicts with built-in preferences the |name| value should contain an application-specific prefix followed by a period (e.g. “myapp.value”). The contents of |default_value| will be copied. The data type for the preference will be inferred from |default_value|’s type and cannot be changed after registration. Returns true (1) on success. Returns false (0) if |name| is already registered or if |default_value| has an invalid type. This function must be called from within the scope of the cef_browser_process_handler_t::OnRegisterCustomPreferences callback.
Trait Implementations§
Source§impl Clone for _cef_preference_registrar_t
impl Clone for _cef_preference_registrar_t
Source§fn clone(&self) -> _cef_preference_registrar_t
fn clone(&self) -> _cef_preference_registrar_t
Returns a duplicate 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 moreSource§impl Debug for _cef_preference_registrar_t
impl Debug for _cef_preference_registrar_t
impl Copy for _cef_preference_registrar_t
Auto Trait Implementations§
impl Freeze for _cef_preference_registrar_t
impl RefUnwindSafe for _cef_preference_registrar_t
impl Send for _cef_preference_registrar_t
impl Sync for _cef_preference_registrar_t
impl Unpin for _cef_preference_registrar_t
impl UnwindSafe for _cef_preference_registrar_t
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