Struct rkyv_dyn::ArchivedDynMetadata
source · [−]pub struct ArchivedDynMetadata<T: ?Sized> { /* private fields */ }
Expand description
The archived version of DynMetadata
.
Implementations
sourceimpl<T: TypeName + ?Sized> ArchivedDynMetadata<T>
impl<T: TypeName + ?Sized> ArchivedDynMetadata<T>
sourcepub unsafe fn emplace(type_id: u64, out: *mut Self)
pub unsafe fn emplace(type_id: u64, out: *mut Self)
Creates a new ArchivedDynMetadata
for the given type.
Safety
out
must point to a valid location for an ArchivedDynMetadata<T>
.
sourcepub fn vtable(&self) -> usize
pub fn vtable(&self) -> usize
Gets the vtable address for this trait object. With the vtable_cache
feature, this will
store the address locally on the first lookup.
sourcepub fn pointer_metadata(&self) -> DynMetadata<T>
pub fn pointer_metadata(&self) -> DynMetadata<T>
Gets the DynMetadata
associated with this ArchivedDynMetadata
.
Trait Implementations
sourceimpl<T: TypeName + ?Sized, C: ?Sized> CheckBytes<C> for ArchivedDynMetadata<T>
impl<T: TypeName + ?Sized, C: ?Sized> CheckBytes<C> for ArchivedDynMetadata<T>
type Error = DynMetadataError
type Error = DynMetadataError
The error that may result from checking the type.
sourceunsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for ArchivedDynMetadata<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Send for ArchivedDynMetadata<T> where
T: Send,
impl<T: ?Sized> Sync for ArchivedDynMetadata<T> where
T: Sync,
impl<T: ?Sized> Unpin for ArchivedDynMetadata<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for ArchivedDynMetadata<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more