pub struct PbBytesReader { /* private fields */ }Expand description
In-memory PB stream reader. Reads the same line-escaped PB format as
PbFileReader but from a Vec<u8> (e.g. an HTTP response body from a
failover peer). Yields ArchiverSamples through EventStream.
Implementations§
Source§impl PbBytesReader
impl PbBytesReader
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Result<Self>
pub fn from_bytes(bytes: Vec<u8>) -> Result<Self>
Decode header + samples from a complete in-memory PB body.
Trait Implementations§
Source§impl EventStream for PbBytesReader
impl EventStream for PbBytesReader
fn description(&self) -> &EventStreamDesc
fn next_event(&mut self) -> Result<Option<ArchiverSample>>
Auto Trait Implementations§
impl Freeze for PbBytesReader
impl RefUnwindSafe for PbBytesReader
impl Send for PbBytesReader
impl Sync for PbBytesReader
impl Unpin for PbBytesReader
impl UnsafeUnpin for PbBytesReader
impl UnwindSafe for PbBytesReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more