#[repr(C)]pub struct OptionVTable {
pub is_some: unsafe extern "C" fn(PtrConst) -> bool,
pub get_value: unsafe extern "C" fn(PtrConst) -> *const u8,
pub init_some: unsafe extern "C" fn(PtrUninit, PtrMut) -> PtrMut,
pub init_none: unsafe extern "C" fn(PtrUninit) -> PtrMut,
pub replace_with: unsafe extern "C" fn(PtrMut, *mut u8),
}Expand description
Virtual table for Option<T>
Fields§
§is_some: unsafe extern "C" fn(PtrConst) -> boolcf. OptionIsSomeFn
get_value: unsafe extern "C" fn(PtrConst) -> *const u8cf. OptionGetValueFn
init_some: unsafe extern "C" fn(PtrUninit, PtrMut) -> PtrMutcf. OptionInitSomeFn
init_none: unsafe extern "C" fn(PtrUninit) -> PtrMutcf. OptionInitNoneFn
replace_with: unsafe extern "C" fn(PtrMut, *mut u8)Implementations§
Source§impl OptionVTable
impl OptionVTable
Sourcepub const fn builder() -> OptionVTableBuilder
pub const fn builder() -> OptionVTableBuilder
Creates a new builder for this vtable
Trait Implementations§
Source§impl Clone for OptionVTable
impl Clone for OptionVTable
Source§fn clone(&self) -> OptionVTable
fn clone(&self) -> OptionVTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OptionVTable
Auto Trait Implementations§
impl Freeze for OptionVTable
impl RefUnwindSafe for OptionVTable
impl Send for OptionVTable
impl Sync for OptionVTable
impl Unpin for OptionVTable
impl UnsafeUnpin for OptionVTable
impl UnwindSafe for OptionVTable
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