[−][src]Trait pb_jelly::PbBufferReader
All concrete types which are used for deserialization should implement PbBufferReader, which includes functions to convert to and from PbBuffer.
Required methods
fn split(&mut self, at: usize) -> Self
Advance the interal cursor by at
, and return a PbBufferReader corresponding to the
traversed indices (i.e. self.position..self.position + at).
Provided methods
fn as_buffer<B: PbBuffer>(&self) -> Result<B>
Get a reference to the underlying PbBuffer. This is expected to be cheap,
if supported, or return error.
The implementation should dispatch on the type B
and return an error
if the requested buffer type is unknown.