#[repr(C)]pub struct ZL_OpaquePtr {
pub ptr: *mut c_void,
pub freeOpaquePtr: *mut c_void,
pub freeFn: Option<unsafe extern "C" fn(freeOpaquePtr: *mut c_void, ptr: *mut c_void)>,
}Fields§
§ptr: *mut c_voidOpaque pointer that is passed back to the user when calling functions like:
- ZL_Encoder_getOpaquePtr()
- ZL_Decoder_getOpaquePtr()
- ZL_Graph_getOpaquePtr()
- ZL_Selector_getOpaquePtr()
freeOpaquePtr: *mut c_voidAdditional pointer passed to the free function. This additional pointer allows, for example, to use a C++ lambda as a free function.
freeFn: Option<unsafe extern "C" fn(freeOpaquePtr: *mut c_void, ptr: *mut c_void)>Frees the ZL_OpaquePtr::ptr, and if needed also the ZL_OpaquePtr::freeOpaquePtr. This function is called exactly once by OpenZL once the opaque pointer has been registered. If freeFn is NULL, then it is not called.
Trait Implementations§
Source§impl Clone for ZL_OpaquePtr
impl Clone for ZL_OpaquePtr
Source§fn clone(&self) -> ZL_OpaquePtr
fn clone(&self) -> ZL_OpaquePtr
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 ZL_OpaquePtr
impl Debug for ZL_OpaquePtr
Source§impl Default for ZL_OpaquePtr
impl Default for ZL_OpaquePtr
impl Copy for ZL_OpaquePtr
Auto Trait Implementations§
impl Freeze for ZL_OpaquePtr
impl RefUnwindSafe for ZL_OpaquePtr
impl !Send for ZL_OpaquePtr
impl !Sync for ZL_OpaquePtr
impl Unpin for ZL_OpaquePtr
impl UnwindSafe for ZL_OpaquePtr
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