pub struct LiveDataBuffer { /* private fields */ }
Expand description
A size-adapting buffer that supports decoding VBus live data. See
BlobBuffer
for details.
Implementations§
Source§impl LiveDataBuffer
impl LiveDataBuffer
Sourcepub fn new(channel: u8) -> LiveDataBuffer
pub fn new(channel: u8) -> LiveDataBuffer
Constructs a LiveDataReader
.
Sourcepub fn extend_from_slice(&mut self, bytes: &[u8])
pub fn extend_from_slice(&mut self, bytes: &[u8])
Write bytes to the internal buffer.
Sourcepub fn peek_length(&mut self) -> Option<usize>
pub fn peek_length(&mut self) -> Option<usize>
Try to peek length of valid blob in internal buffer.
Sourcepub fn read_bytes(&mut self) -> Option<&[u8]>
pub fn read_bytes(&mut self) -> Option<&[u8]>
Try to read a valid blob of bytes from internal buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveDataBuffer
impl RefUnwindSafe for LiveDataBuffer
impl Send for LiveDataBuffer
impl Sync for LiveDataBuffer
impl Unpin for LiveDataBuffer
impl UnwindSafe for LiveDataBuffer
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