[][src]Struct miniaudio::RingBufferRecv

pub struct RingBufferRecv<T: Clone> { /* fields omitted */ }

Be aware that it is not safe to have this being written to from multiple threads. This is part of a single producer single consumer ring buffer.

Implementations

impl<T: Clone> RingBufferRecv<T>[src]

pub fn read(&self, dest: &mut [T]) -> usize[src]

Read a buffer of items from a ring buffer, returning the number of items that were successfully read. Be aware that it is not safe to have this being written to from multiple threads. This is part of a single producer single consumer ring buffer.

pub fn read_with<F>(&self, count_requested: usize, f: F) -> usize where
    F: FnOnce(&[T]), 
[src]

Used to retrieve a section of the ring buffer for reading. You specify the number of items you would like to read and a slice with the number of requested items (or less if the buffer needs to wrap), will be passed to the given closure.

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

Returns the number of items that are available for reading.

Trait Implementations

impl<T: Clone> Clone for RingBufferRecv<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for RingBufferRecv<T> where
    T: RefUnwindSafe

impl<T> Send for RingBufferRecv<T> where
    T: Send

impl<T> Sync for RingBufferRecv<T> where
    T: Send

impl<T> Unpin for RingBufferRecv<T>

impl<T> UnwindSafe for RingBufferRecv<T> where
    T: RefUnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.