#[repr(C)]pub struct PointerDef {
pub vtable: &'static PointerVTable,
pub pointee: Option<fn() -> &'static Shape>,
pub weak: Option<fn() -> &'static Shape>,
pub strong: Option<fn() -> &'static Shape>,
pub flags: PointerFlags,
pub known: Option<KnownPointer>,
}
Expand description
Describes a pointer — including a vtable to query and alter its state, and the inner shape (the pointee type in the pointer).
Fields§
§vtable: &'static PointerVTable
vtable for interacting with the pointer
pointee: Option<fn() -> &'static Shape>
shape of the inner type of the pointer, if not opaque
weak: Option<fn() -> &'static Shape>
shape of the corresponding strong pointer, if this pointer is weak
strong: Option<fn() -> &'static Shape>
shape of the corresponding weak pointer, if this pointer is strong
flags: PointerFlags
Flags representing various characteristics of the pointer
known: Option<KnownPointer>
An optional field to identify the kind of pointer
Implementations§
Source§impl PointerDef
impl PointerDef
Sourcepub const fn builder() -> PointerDefBuilder
pub const fn builder() -> PointerDefBuilder
Creates a new PointerDefBuilder
with all fields set to None
.
Sourcepub fn pointee(&self) -> Option<&'static Shape>
pub fn pointee(&self) -> Option<&'static Shape>
Returns shape of the inner type of the pointer, if not opaque
Trait Implementations§
Source§impl Clone for PointerDef
impl Clone for PointerDef
Source§fn clone(&self) -> PointerDef
fn clone(&self) -> PointerDef
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 PointerDef
impl Debug for PointerDef
impl Copy for PointerDef
Auto Trait Implementations§
impl Freeze for PointerDef
impl RefUnwindSafe for PointerDef
impl Send for PointerDef
impl Sync for PointerDef
impl Unpin for PointerDef
impl UnwindSafe for PointerDef
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