#[repr(C)]pub struct C4ExtraInfo {
pub pointer: *mut c_void,
pub destructor: Option<unsafe extern "C" fn(ptr: *mut c_void)>,
}Expand description
Client-defined metadata that can be associated with some objects like C4Database.
(See \ref c4db_setExtraInfo, \ref c4db_getExtraInfo.)
For example, if you have your own “Database” class, you could store a pointer to it in the
ExtraInfo of the corresponding C4Database so you can map from it back to your object.
The destructor callback is optional, but gives you a chance to clean up (e.g. release) your
own object when the containing C4 object is freed.
Fields§
§pointer: *mut c_void§destructor: Option<unsafe extern "C" fn(ptr: *mut c_void)>Client-specific pointer; can be anything
Trait Implementations§
Source§impl Clone for C4ExtraInfo
impl Clone for C4ExtraInfo
Source§fn clone(&self) -> C4ExtraInfo
fn clone(&self) -> C4ExtraInfo
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 C4ExtraInfo
impl Debug for C4ExtraInfo
impl Copy for C4ExtraInfo
Auto Trait Implementations§
impl Freeze for C4ExtraInfo
impl RefUnwindSafe for C4ExtraInfo
impl !Send for C4ExtraInfo
impl !Sync for C4ExtraInfo
impl Unpin for C4ExtraInfo
impl UnwindSafe for C4ExtraInfo
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