pub struct PokeSmartPointerUninit<'mem> { /* private fields */ }Expand description
Allows initializing an uninitialized option
Implementations§
Source§impl<'mem> PokeSmartPointerUninit<'mem>
impl<'mem> PokeSmartPointerUninit<'mem>
Sourcepub fn def(&self) -> &SmartPointerDef
pub fn def(&self) -> &SmartPointerDef
Returns the smart pointer definition.
Sourcepub fn vtable(&self) -> &'static SmartPointerVTable
pub fn vtable(&self) -> &'static SmartPointerVTable
Returns the smart pointer vtable
Sourcepub fn into_value(self) -> PokeValueUninit<'mem>
pub fn into_value(self) -> PokeValueUninit<'mem>
Get a reference to the underlying PokeValue
Sourcepub fn from_t<T>(self, value: T) -> Option<PokeSmartPointer<'mem>>
pub fn from_t<T>(self, value: T) -> Option<PokeSmartPointer<'mem>>
Creates a new smart pointer around a given T
Returns None if the smart pointer cannot be created directly
(like for weak pointers).
Sourcepub fn from_peek_value(
self,
value: PeekValue<'mem>,
) -> Option<PokeSmartPointer<'mem>>
pub fn from_peek_value( self, value: PeekValue<'mem>, ) -> Option<PokeSmartPointer<'mem>>
Creates a new smart pointer from an existing PeekValue.
Note: The PeekValue is moved out of (consumed) during this operation.
It must be deallocated by the caller on success.
Returns None if the smart pointer cannot be created directly
(like for weak pointers).
Auto Trait Implementations§
impl<'mem> Freeze for PokeSmartPointerUninit<'mem>
impl<'mem> RefUnwindSafe for PokeSmartPointerUninit<'mem>
impl<'mem> !Send for PokeSmartPointerUninit<'mem>
impl<'mem> !Sync for PokeSmartPointerUninit<'mem>
impl<'mem> Unpin for PokeSmartPointerUninit<'mem>
impl<'mem> !UnwindSafe for PokeSmartPointerUninit<'mem>
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