[−][src]Struct ringu::Ringu
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
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>,