[][src]Struct async_resol_vbus::LiveDataBuffer

pub struct LiveDataBuffer { /* fields omitted */ }

A size-adapting buffer that supports decoding VBus live data. See BlobBuffer for details.

Methods

impl LiveDataBuffer[src]

pub fn new(channel: u8) -> LiveDataBuffer[src]

Constructs a LiveDataReader.

pub fn extend_from_slice(&mut self, bytes: &[u8])[src]

Write bytes to the internal buffer.

pub fn peek_length(&mut self) -> Option<usize>[src]

Try to peek length of valid blob in internal buffer.

pub fn read_bytes(&mut self) -> Option<&[u8]>[src]

Try to read a valid blob of bytes from internal buffer.

pub fn read_data(&mut self) -> Option<Data>[src]

Try to read a valid blob of bytes as Data from internal buffer.

pub fn offset(&self) -> usize[src]

Get amount of already read bytes.

Trait Implementations

impl Debug for LiveDataBuffer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.