#[repr(C)]pub struct OptionVTable {
pub is_some: unsafe fn(PtrConst) -> bool,
pub get_value: unsafe fn(PtrConst) -> Option<PtrConst>,
pub init_some: unsafe fn(PtrUninit, PtrConst) -> PtrMut,
pub init_none: unsafe fn(PtrUninit) -> PtrMut,
pub replace_with: unsafe fn(PtrMut, Option<PtrConst>),
}Expand description
Virtual table for Option<T>
Fields§
§is_some: unsafe fn(PtrConst) -> boolcf. OptionIsSomeFn
get_value: unsafe fn(PtrConst) -> Option<PtrConst>cf. OptionGetValueFn
init_some: unsafe fn(PtrUninit, PtrConst) -> PtrMutcf. OptionInitSomeFn
init_none: unsafe fn(PtrUninit) -> PtrMutcf. OptionInitNoneFn
replace_with: unsafe fn(PtrMut, Option<PtrConst>)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 · 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 OptionVTable
impl Debug for OptionVTable
impl 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 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