pub trait ArchivePointee: Pointee {
type ArchivedMetadata: Copy + Send + Sync + Ord + Hash + Unpin + Portable + NoUndef + Default;
// Required method
fn pointer_metadata(
archived: &Self::ArchivedMetadata,
) -> <Self as Pointee>::Metadata;
}
Expand description
An archived type with associated metadata for its relative pointer.
This is mostly used in the context of smart pointers and unsized types, and is implemented for all sized types by default.
Required Associated Types§
Required Methods§
Sourcefn pointer_metadata(
archived: &Self::ArchivedMetadata,
) -> <Self as Pointee>::Metadata
fn pointer_metadata( archived: &Self::ArchivedMetadata, ) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.