[−][src]Struct async_resol_vbus::LiveDataBuffer
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
Auto Trait Implementations
impl RefUnwindSafe for LiveDataBuffer
impl Send for LiveDataBuffer
impl Sync for LiveDataBuffer
impl Unpin for LiveDataBuffer
impl UnwindSafe for LiveDataBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,