Struct rkyv::with::Boxed [−][src]
pub struct Boxed;
Expand description
A wrapper that serializes a reference as if it were boxed.
Unlike Inline
, unsized references can be serialized with Boxed
.
References serialized with Boxed
cannot be deserialized because the struct cannot own the
deserialized value.
Example
use rkyv::{Archive, with::Boxed}; #[derive(Archive)] struct Example<'a> { #[with(Boxed)] a: &'a str, }
Trait Implementations
type Archived = ArchivedBox<F::Archived>
type Archived = ArchivedBox<F::Archived>
The archived type of a With<F, Self>
.
type Resolver = BoxResolver<F::MetadataResolver>
type Resolver = BoxResolver<F::MetadataResolver>
The resolver of a With<F, Self>
.
Auto Trait Implementations
impl RefUnwindSafe for Boxed
impl UnwindSafe for Boxed
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more