Struct rotary::BufChannelMut[][src]

pub struct BufChannelMut<'a, T> { /* fields omitted */ }

The mutable buffer of a single channel.

This doesn’t provide direct access to the underlying buffer, but rather allows us to copy data usinga number of utility functions.

Implementations

impl<'a, T> BufChannelMut<'a, T>[src]

pub fn linear(buf: &'a mut [T]) -> Self[src]

Construct a linear buffer.

pub fn interleaved(buf: &'a mut [T], channels: usize, channel: usize) -> Self[src]

Construct an interleaved buffer.

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

The number of frames in the buffer.

pub fn chunks(&self, chunk: usize) -> usize[src]

The number of chunks that can fit with the given size.

pub fn set(&mut self, n: usize, value: T)[src]

Set the value at the given frame in the current channel.

pub fn copy_from_slice(&mut self, buf: &[T]) where
    T: Copy
[src]

Copy from the given slice.

pub fn copy_from_iter<R, I>(&mut self, range: R, iter: I) where
    R: Range,
    I: IntoIterator<Item = T>, 
[src]

Copy a chunked destination from an iterator.

Trait Implementations

impl<'a, T: Debug> Debug for BufChannelMut<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for BufChannelMut<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for BufChannelMut<'a, T> where
    T: Send

impl<'a, T> Sync for BufChannelMut<'a, T> where
    T: Sync

impl<'a, T> Unpin for BufChannelMut<'a, T>

impl<'a, T> !UnwindSafe for BufChannelMut<'a, T>

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, 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.