[][src]Struct miniaudio::RingBufferSend

pub struct RingBufferSend<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> 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]

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]

Auto Trait Implementations

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

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

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

impl<T> Unpin for RingBufferSend<T>

impl<T> UnwindSafe for RingBufferSend<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.