pub struct SmartPointerVTable {
pub upgrade_into_fn: Option<for<'ptr> unsafe fn(PtrMut<'ptr>, PtrUninit<'ptr>) -> Option<PtrMut<'ptr>>>,
pub downgrade_into_fn: Option<for<'ptr> unsafe fn(PtrMut<'ptr>, PtrUninit<'ptr>) -> PtrMut<'ptr>>,
pub borrow_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> PtrConst<'ptr>>,
pub new_into_fn: Option<for<'ptr> unsafe fn(PtrUninit<'ptr>, PtrConst<'ptr>) -> PtrMut<'ptr>>,
pub lock_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> Result<LockResult<'ptr>, ()>>,
pub read_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> Result<LockResult<'ptr>, ()>>,
pub write_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> Result<LockResult<'ptr>, ()>>,
}Expand description
Functions for interacting with a smart pointer
Fields§
§upgrade_into_fn: Option<for<'ptr> unsafe fn(PtrMut<'ptr>, PtrUninit<'ptr>) -> Option<PtrMut<'ptr>>>See UpgradeIntoFn
downgrade_into_fn: Option<for<'ptr> unsafe fn(PtrMut<'ptr>, PtrUninit<'ptr>) -> PtrMut<'ptr>>See DowngradeIntoFn
borrow_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> PtrConst<'ptr>>See BorrowFn
new_into_fn: Option<for<'ptr> unsafe fn(PtrUninit<'ptr>, PtrConst<'ptr>) -> PtrMut<'ptr>>See NewIntoFn
lock_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> Result<LockResult<'ptr>, ()>>See LockFn
read_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> Result<LockResult<'ptr>, ()>>See ReadFn
write_fn: Option<for<'ptr> unsafe fn(PtrConst<'ptr>) -> Result<LockResult<'ptr>, ()>>See WriteFn
Implementations§
Source§impl SmartPointerVTable
impl SmartPointerVTable
Sourcepub const fn builder() -> SmartPointerVTableBuilder
pub const fn builder() -> SmartPointerVTableBuilder
Creates a new SmartPointerVTableBuilder with all fields set to None.
Trait Implementations§
Source§impl Clone for SmartPointerVTable
impl Clone for SmartPointerVTable
Source§fn clone(&self) -> SmartPointerVTable
fn clone(&self) -> SmartPointerVTable
Returns a copy 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 SmartPointerVTable
impl Debug for SmartPointerVTable
Source§impl Hash for SmartPointerVTable
impl Hash for SmartPointerVTable
Source§impl PartialEq for SmartPointerVTable
impl PartialEq for SmartPointerVTable
impl Copy for SmartPointerVTable
impl Eq for SmartPointerVTable
impl StructuralPartialEq for SmartPointerVTable
Auto Trait Implementations§
impl Freeze for SmartPointerVTable
impl RefUnwindSafe for SmartPointerVTable
impl Send for SmartPointerVTable
impl Sync for SmartPointerVTable
impl Unpin for SmartPointerVTable
impl UnwindSafe for SmartPointerVTable
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