Trait rkyv::ArchivePointee

source ·
pub trait ArchivePointee: Pointee {
    type ArchivedMetadata;

    // 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§

source

type ArchivedMetadata

The archived version of the pointer metadata for this type.

Required Methods§

source

fn pointer_metadata( archived: &Self::ArchivedMetadata ) -> <Self as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ArchivePointee for str

source§

impl ArchivePointee for CStr

source§

impl<T> ArchivePointee for [T]

Implementors§