devela::_dep::rkyv::traits

Trait ArchivePointee

pub trait ArchivePointee: Pointee {
    type ArchivedMetadata: Copy + Send + Sync + Ord + Hash + Unpin + Portable + NoUndef + Default;

    // Required method
    fn pointer_metadata(archived: &Self::ArchivedMetadata) -> Self::Metadata;
}
Available on crate feature dep_rkyv only.
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§

type ArchivedMetadata: Copy + Send + Sync + Ord + Hash + Unpin + Portable + NoUndef + Default

The archived version of the pointer metadata for this type.

Required Methods§

fn pointer_metadata(archived: &Self::ArchivedMetadata) -> Self::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.

Implementations on Foreign Types§

§

impl ArchivePointee for str

§

impl<T> ArchivePointee for [T]

Implementors§