Type Alias Boxed

Source
pub type Boxed = RefAsBox;
👎Deprecated: Use RefAsBox for references, or AsBox for direct fields
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,
}

Aliased Type§

struct Boxed;