Type Definition rkyv::with::Boxed

source · []
pub type Boxed = RefAsBox;

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.


use rkyv::{Archive, with::Boxed};

struct Example<'a> {
    a: &'a str,