[][src]Struct shufflebuf::ShuffleBuf

pub struct ShuffleBuf { /* fields omitted */ }

Methods

impl ShuffleBuf[src]

Simple buffer implementation using slices

pub fn default() -> Self[src]

pub fn read_one(&mut self) -> (usize, u8)[src]

Read one byte from the buffer Returns the number of bytes returned (0 or 1)

pub fn read_many(&mut self, out_buf: &mut [u8]) -> usize[src]

Pull some data out of the buffer Returns the number of bytes returned (out_buf.len() max)

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

How much data is available to read?

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

How much space is vacant in the buffer?

pub fn push_one(&mut self, data: u8) -> usize[src]

Push one byte into the buffer

pub fn push_many(&mut self, data: &[u8]) -> usize[src]

Copy some data into the buffer

Auto Trait Implementations

impl Send for ShuffleBuf

impl Sync for ShuffleBuf

impl Unpin for ShuffleBuf

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.