Trait dyn_dyn::DynDynCastTarget
source · pub trait DynDynCastTarget: Sealed {
type Root: ?Sized;
// Required methods
fn ptr_into_parts(
ptr: NonNull<Self>
) -> (NonNull<()>, DynMetadata<Self::Root>);
fn ptr_from_parts(
data: NonNull<()>,
meta: DynMetadata<Self::Root>
) -> NonNull<Self>;
fn meta_for_ty<U: Unsize<Self>>() -> DynMetadata<Self::Root>;
}Expand description
A type whose pointer metadata can be stored in a DynDynTable.
Required Associated Types§
Required Methods§
sourcefn ptr_into_parts(ptr: NonNull<Self>) -> (NonNull<()>, DynMetadata<Self::Root>)
fn ptr_into_parts(ptr: NonNull<Self>) -> (NonNull<()>, DynMetadata<Self::Root>)
Splits a fat pointer into its data pointer and metadata.
sourcefn ptr_from_parts(
data: NonNull<()>,
meta: DynMetadata<Self::Root>
) -> NonNull<Self>
fn ptr_from_parts( data: NonNull<()>, meta: DynMetadata<Self::Root> ) -> NonNull<Self>
Combines a data pointer with the provided metadata to produce a fat pointer.
sourcefn meta_for_ty<U: Unsize<Self>>() -> DynMetadata<Self::Root>
fn meta_for_ty<U: Unsize<Self>>() -> DynMetadata<Self::Root>
Gets the metadata that would be used for an object of concrete type U when cast to this type.
Object Safety§
This trait is not object safe.