[][src]Struct ringu::Ringu

pub struct Ringu { /* fields omitted */ }

Implementations

impl Ringu[src]

pub fn default() -> Self[src]

pub fn new_with_spin(spin: SpinFunc) -> Self[src]

Provide a custom spin function that will be called when we're trying to lock this struct

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

How much data is available to be read?

pub fn full(&self) -> bool[src]

Is the buffer full?

pub fn empty(&self) -> bool[src]

Is the buffer empty?

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

At the moment, how much vacant space remains in the buffer?

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

Push one byte into the buffer Returns the number of bytes actually pushed (zero or one)

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

Read one byte from the buffer Returns the number of bytes actually read (zero or one) and the byte read (if any)

Auto Trait Implementations

impl Send for Ringu

impl Sync for Ringu

impl Unpin for Ringu

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.