Skip to main content

ArchiveView

Trait ArchiveView 

Source
pub trait ArchiveView: Send + 'static {
    type Archived<'a>
       where Self: 'a;

    // Required method
    fn view_archive(bytes: &[u8]) -> Result<Self::Archived<'_>, ChannelError>;
}
Expand description

Validates archive bytes and returns a typed borrowed view.

Required Associated Types§

Source

type Archived<'a> where Self: 'a

Borrowed representation backed by the archive byte buffer.

Required Methods§

Source

fn view_archive(bytes: &[u8]) -> Result<Self::Archived<'_>, ChannelError>

Validate and view an archived value without allocating an owned value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ArchiveView for String

Source§

impl ArchiveView for i32

Implementors§