Trait pb_jelly::PbBuffer[][src]

pub trait PbBuffer: Any + Clone + Default {
    type Reader: PbBufferReader;
    fn len(&self) -> usize;
fn into_reader(self) -> Self::Reader; fn from_reader<R: PbBufferReader>(reader: &mut R) -> Result<Self> { ... } }
Expand description

A stand-in trait for any backing buffer store. Required to be object-safe for lazy evaluation. PbBuffers are expected to own references to the data they reference, and should be cheap (constant-time) to clone.

Associated Types

Required methods

Provided methods

Deserialize this buffer from a reader. Unless overridden, this will error if the reader does not support casting to Self.

Implementations on Foreign Types

Implementors