#[repr(C)]pub struct _cef_base_ref_counted_t {
pub size: usize,
pub add_ref: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t)>,
pub release: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> c_int>,
pub has_one_ref: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> c_int>,
pub has_at_least_one_ref: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> c_int>,
}Expand description
All ref-counted framework structures must include this structure first.
Fields§
§size: usizeSize of the data structure.
add_ref: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t)>Called to increment the reference count for the object. Should be called for every new copy of a pointer to a given object.
release: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> c_int>Called to decrement the reference count for the object. If the reference count falls to 0 the object should self-delete. Returns true (1) if the resulting reference count is 0.
has_one_ref: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> c_int>Returns true (1) if the current reference count is 1.
has_at_least_one_ref: Option<unsafe extern "C" fn(self_: *mut _cef_base_ref_counted_t) -> c_int>Returns true (1) if the current reference count is at least 1.
Trait Implementations§
Source§impl Clone for _cef_base_ref_counted_t
impl Clone for _cef_base_ref_counted_t
Source§fn clone(&self) -> _cef_base_ref_counted_t
fn clone(&self) -> _cef_base_ref_counted_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_base_ref_counted_t
impl Debug for _cef_base_ref_counted_t
impl Copy for _cef_base_ref_counted_t
Auto Trait Implementations§
impl Freeze for _cef_base_ref_counted_t
impl RefUnwindSafe for _cef_base_ref_counted_t
impl Send for _cef_base_ref_counted_t
impl Sync for _cef_base_ref_counted_t
impl Unpin for _cef_base_ref_counted_t
impl UnwindSafe for _cef_base_ref_counted_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