[−][src]Struct miniaudio::RingBufferRecv
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]
F: FnOnce(&[T]),
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for RingBufferRecv<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for RingBufferRecv<T> where
T: Send,
T: Send,
impl<T> Sync for RingBufferRecv<T> where
T: Send,
T: Send,
impl<T> Unpin for RingBufferRecv<T>
impl<T> UnwindSafe for RingBufferRecv<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,