pub struct Shape {
pub name: &'static str,
pub typeid: TypeId,
pub layout: Layout,
pub innards: Innards,
pub set_to_default: Option<fn(*mut u8)>,
pub drop_in_place: Option<DropFunction>,
}
Expand description
Schema for reflection of a type
Fields§
§name: &'static str
A descriptive name for the type, e.g. u64
, or Person
typeid: TypeId
The typeid of the underlying type
layout: Layout
Size & alignment
innards: Innards
Details/contents of the value
set_to_default: Option<fn(*mut u8)>
Set the value at a given address to the default value for this type
drop_in_place: Option<DropFunction>
Drop the value at a given address
§Safety
This function should be called only for initialized values. It’s the caller’s responsibility to ensure the address points to a valid value.
Implementations§
Trait Implementations§
impl Copy for Shape
impl Eq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for 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