Struct ptr_meta::DynMetadata
source · pub struct DynMetadata<Dyn: ?Sized> { /* private fields */ }
Expand description
The metadata for a trait object.
This struct wraps a pointer to a vtable (virtual method table) which contains all of the necessary information to manipulate the concrete type stored inside of the trait object:
- The size and alignment of the concrete type
- A function pointer to the type’s
drop_in_place
impl - Function pointers for each method in the concrete type’s trait implementation
Providing a type argument that is not a dyn
trait object is possible, but
does not correspond with a meaningful type.
Implementations§
source§impl<Dyn: ?Sized> DynMetadata<Dyn>
impl<Dyn: ?Sized> DynMetadata<Dyn>
Trait Implementations§
source§impl<Dyn: ?Sized> Clone for DynMetadata<Dyn>
impl<Dyn: ?Sized> Clone for DynMetadata<Dyn>
source§impl<Dyn: ?Sized> Debug for DynMetadata<Dyn>
impl<Dyn: ?Sized> Debug for DynMetadata<Dyn>
source§impl<Dyn: ?Sized> Hash for DynMetadata<Dyn>
impl<Dyn: ?Sized> Hash for DynMetadata<Dyn>
source§impl<Dyn: ?Sized> Ord for DynMetadata<Dyn>
impl<Dyn: ?Sized> Ord for DynMetadata<Dyn>
source§impl<Dyn: ?Sized> PartialEq for DynMetadata<Dyn>
impl<Dyn: ?Sized> PartialEq for DynMetadata<Dyn>
source§impl<Dyn: ?Sized> PartialOrd for DynMetadata<Dyn>
impl<Dyn: ?Sized> PartialOrd for DynMetadata<Dyn>
impl<Dyn: ?Sized> Copy for DynMetadata<Dyn>
impl<Dyn: ?Sized> Eq for DynMetadata<Dyn>
impl<Dyn: ?Sized> Send for DynMetadata<Dyn>
impl<Dyn: ?Sized> Sync for DynMetadata<Dyn>
impl<Dyn: ?Sized> Unpin for DynMetadata<Dyn>
Auto Trait Implementations§
impl<Dyn> Freeze for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<Dyn> RefUnwindSafe for DynMetadata<Dyn>where
Dyn: RefUnwindSafe + ?Sized,
impl<Dyn> UnwindSafe for DynMetadata<Dyn>where
Dyn: UnwindSafe + ?Sized,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)