#[non_exhaustive]#[repr(C)]pub struct ValuePointerType<'shape> {
pub mutable: bool,
pub wide: bool,
pub target: fn() -> &'shape Shape<'shape>,
}Expand description
Describes the raw/reference pointer
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mutable: boolIs the pointer mutable or not.
wide: boolDescribes whether the pointer is wider or not
Note: if the pointer is wide, then the target shape will have ShapeLayout::Unsized, and
the vtables of the target shape will expect the pointer to this pointer, rather than the
resulting address of unsized data. This is because wide pointer’s metadata information is
an undefined implementation detail, at this current moment.
target: fn() -> &'shape Shape<'shape>Shape of the pointer’s pointee
This needs to be indirect (behind a function), in order to allow recursive types without overflowing the const-eval system.
Implementations§
Trait Implementations§
Source§impl<'shape> Clone for ValuePointerType<'shape>
impl<'shape> Clone for ValuePointerType<'shape>
Source§fn clone(&self) -> ValuePointerType<'shape>
fn clone(&self) -> ValuePointerType<'shape>
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<'shape> Debug for ValuePointerType<'shape>
impl<'shape> Debug for ValuePointerType<'shape>
Source§impl<'shape> Hash for ValuePointerType<'shape>
impl<'shape> Hash for ValuePointerType<'shape>
Source§impl<'shape> PartialEq for ValuePointerType<'shape>
impl<'shape> PartialEq for ValuePointerType<'shape>
impl<'shape> Copy for ValuePointerType<'shape>
impl<'shape> Eq for ValuePointerType<'shape>
impl<'shape> StructuralPartialEq for ValuePointerType<'shape>
Auto Trait Implementations§
impl<'shape> Freeze for ValuePointerType<'shape>
impl<'shape> RefUnwindSafe for ValuePointerType<'shape>
impl<'shape> Send for ValuePointerType<'shape>
impl<'shape> Sync for ValuePointerType<'shape>
impl<'shape> Unpin for ValuePointerType<'shape>
impl<'shape> UnwindSafe for ValuePointerType<'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