#[repr(C)]pub struct PointerDef<'shape> {
pub vtable: &'shape PointerVTable<'shape>,
pub pointee: Option<fn() -> &'shape Shape<'shape>>,
pub weak: Option<fn() -> &'shape Shape<'shape>>,
pub strong: Option<fn() -> &'shape Shape<'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: &'shape PointerVTable<'shape>vtable for interacting with the pointer
pointee: Option<fn() -> &'shape Shape<'shape>>shape of the inner type of the pointer, if not opaque
weak: Option<fn() -> &'shape Shape<'shape>>shape of the corresponding strong pointer, if this pointer is weak
strong: Option<fn() -> &'shape Shape<'shape>>shape of the corresponding weak pointer, if this pointer is strong
flags: PointerFlagsFlags representing various characteristics of the pointer
known: Option<KnownPointer>An optional field to identify the kind of pointer
Implementations§
Source§impl<'shape> PointerDef<'shape>
impl<'shape> PointerDef<'shape>
Sourcepub const fn builder() -> PointerDefBuilder<'shape>
pub const fn builder() -> PointerDefBuilder<'shape>
Creates a new PointerDefBuilder with all fields set to None.
Sourcepub fn pointee(&self) -> Option<&'shape Shape<'shape>>
pub fn pointee(&self) -> Option<&'shape Shape<'shape>>
Returns shape of the inner type of the pointer, if not opaque
Trait Implementations§
Source§impl<'shape> Clone for PointerDef<'shape>
impl<'shape> Clone for PointerDef<'shape>
Source§fn clone(&self) -> PointerDef<'shape>
fn clone(&self) -> PointerDef<'shape>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'shape> Debug for PointerDef<'shape>
impl<'shape> Debug for PointerDef<'shape>
impl<'shape> Copy for PointerDef<'shape>
Auto Trait Implementations§
impl<'shape> Freeze for PointerDef<'shape>
impl<'shape> RefUnwindSafe for PointerDef<'shape>
impl<'shape> Send for PointerDef<'shape>
impl<'shape> Sync for PointerDef<'shape>
impl<'shape> Unpin for PointerDef<'shape>
impl<'shape> UnwindSafe for PointerDef<'shape>
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