pub struct PointerVTable {
pub upgrade_into_fn: Option<unsafe fn(PtrMut, PtrUninit) -> Option<PtrMut>>,
pub downgrade_into_fn: Option<unsafe fn(PtrMut, PtrUninit) -> PtrMut>,
pub borrow_fn: Option<unsafe fn(PtrConst) -> PtrConst>,
pub new_into_fn: Option<unsafe fn(PtrUninit, PtrMut) -> PtrMut>,
pub lock_fn: Option<unsafe fn(PtrConst) -> Result<LockResult, ()>>,
pub read_fn: Option<unsafe fn(PtrConst) -> Result<LockResult, ()>>,
pub write_fn: Option<unsafe fn(PtrConst) -> Result<LockResult, ()>>,
pub slice_builder_vtable: Option<&'static SliceBuilderVTable>,
}Expand description
Functions for interacting with a pointer
Fields§
§upgrade_into_fn: Option<unsafe fn(PtrMut, PtrUninit) -> Option<PtrMut>>See UpgradeIntoFn
downgrade_into_fn: Option<unsafe fn(PtrMut, PtrUninit) -> PtrMut>See DowngradeIntoFn
borrow_fn: Option<unsafe fn(PtrConst) -> PtrConst>See BorrowFn
new_into_fn: Option<unsafe fn(PtrUninit, PtrMut) -> PtrMut>See NewIntoFn
lock_fn: Option<unsafe fn(PtrConst) -> Result<LockResult, ()>>See LockFn
read_fn: Option<unsafe fn(PtrConst) -> Result<LockResult, ()>>See ReadFn
write_fn: Option<unsafe fn(PtrConst) -> Result<LockResult, ()>>See WriteFn
slice_builder_vtable: Option<&'static SliceBuilderVTable>Implementations§
Source§impl PointerVTable
impl PointerVTable
Sourcepub const fn new() -> PointerVTable
pub const fn new() -> PointerVTable
Const ctor with all entries set to None.
Trait Implementations§
Source§impl Clone for PointerVTable
impl Clone for PointerVTable
Source§fn clone(&self) -> PointerVTable
fn clone(&self) -> PointerVTable
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 PointerVTable
impl Debug for PointerVTable
Source§impl Default for PointerVTable
impl Default for PointerVTable
Source§fn default() -> PointerVTable
fn default() -> PointerVTable
Returns the “default value” for a type. Read more
impl Copy for PointerVTable
Auto Trait Implementations§
impl Freeze for PointerVTable
impl RefUnwindSafe for PointerVTable
impl Send for PointerVTable
impl Sync for PointerVTable
impl Unpin for PointerVTable
impl UnwindSafe for PointerVTable
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