[−][src]Struct miniaudio::RingBufferSend
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> RingBufferSend<T>
[src]
pub fn write(&self, src: &[T]) -> usize
[src]
Write a buffer of items into the ring buffer, returning the number of items that were successfully written. 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 write_with<F>(&self, count_requested: usize, f: F) -> usize where
F: FnOnce(&mut [T]),
[src]
F: FnOnce(&mut [T]),
Used to retrieve a section of the ring buffer for writing. You specify the number of items you would like to write to 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 writing.
Trait Implementations
impl<T: Clone> Clone for RingBufferSend<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 RingBufferSend<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for RingBufferSend<T> where
T: Send,
T: Send,
impl<T> Sync for RingBufferSend<T> where
T: Send,
T: Send,
impl<T> Unpin for RingBufferSend<T>
impl<T> UnwindSafe for RingBufferSend<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>,