#[repr(C)]pub struct ValuePointerType {
pub mutable: bool,
pub wide: bool,
pub target: fn() -> &'static Shape,
}
Expand description
Describes the raw/reference pointer
Fields§
§mutable: bool
Is the pointer mutable or not.
wide: bool
Describes 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() -> &'static 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 Clone for ValuePointerType
impl Clone for ValuePointerType
Source§fn clone(&self) -> ValuePointerType
fn clone(&self) -> ValuePointerType
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 ValuePointerType
impl Debug for ValuePointerType
impl Copy for ValuePointerType
Auto Trait Implementations§
impl Freeze for ValuePointerType
impl RefUnwindSafe for ValuePointerType
impl Send for ValuePointerType
impl Sync for ValuePointerType
impl Unpin for ValuePointerType
impl UnwindSafe for ValuePointerType
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