Struct audio_core::buf::Tail

source ·
pub struct Tail<B> { /* private fields */ }
Expand description

The tail of a buffer.

See Buf::tail.

Trait Implementations§

source§

impl<B> Buf for Tail<B>
where B: Buf,

§

type Sample = <B as Buf>::Sample

The type of a single sample.
§

type Channel<'this> = <B as Buf>::Channel<'this> where Self: 'this

The type of the channel container.
§

type IterChannels<'this> = IterChannels<<B as Buf>::IterChannels<'this>> where Self: 'this

An iterator over available channels.
source§

fn frames_hint(&self) -> Option<usize>

A typical number of frames for each channel in the buffer, if known. Read more
source§

fn channels(&self) -> usize

The number of channels in the buffer. Read more
source§

fn get_channel(&self, channel: usize) -> Option<Self::Channel<'_>>

Return a handler to the buffer associated with the channel. Read more
source§

fn iter_channels(&self) -> Self::IterChannels<'_>

Construct an iterator over all the channels in the audio buffer. Read more
source§

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Construct a wrapper around this buffer that skips the first n frames. Read more
source§

fn tail(self, n: usize) -> Tail<Self>
where Self: Sized,

Construct a wrapper around this buffer that skips to the last n frames. Read more
source§

fn limit(self, limit: usize) -> Limit<Self>
where Self: Sized,

Construct a wrapper around this buffer which stops after limit frames. Read more
source§

impl<B> BufMut for Tail<B>
where B: BufMut,

§

type ChannelMut<'a> = <B as BufMut>::ChannelMut<'a> where Self: 'a

The type of the mutable channel container.
§

type IterChannelsMut<'a> = IterChannelsMut<<B as BufMut>::IterChannelsMut<'a>> where Self: 'a

A mutable iterator over available channels.
source§

fn get_channel_mut(&mut self, channel: usize) -> Option<Self::ChannelMut<'_>>

Return a mutable handler to the buffer associated with the channel. Read more
source§

fn copy_channel(&mut self, from: usize, to: usize)
where Self::Sample: Copy,

Copy one channel into another. Read more
source§

fn iter_channels_mut(&mut self) -> Self::IterChannelsMut<'_>

Construct a mutable iterator over available channels. Read more
source§

impl<B> ExactSizeBuf for Tail<B>
where B: ExactSizeBuf,

Tail adjusts the implementation of ExactSizeBuf.

use audio::{Buf, ExactSizeBuf};

let buf = audio::interleaved![[0; 4]; 2];

assert_eq!((&buf).tail(0).frames(), 0);
assert_eq!((&buf).tail(1).frames(), 1);
assert_eq!((&buf).tail(5).frames(), 4);
source§

fn frames(&self) -> usize

The number of frames in a buffer. Read more
source§

impl<B> ReadBuf for Tail<B>
where B: ReadBuf,

source§

fn remaining(&self) -> usize

Get the number of frames remaining that can be read from the buffer. Read more
source§

fn advance(&mut self, n: usize)

Advance the read number of frames by n. Read more
source§

fn has_remaining(&self) -> bool

Test if there are any remaining frames to read. Read more

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for Tail<B>
where B: RefUnwindSafe,

§

impl<B> Send for Tail<B>
where B: Send,

§

impl<B> Sync for Tail<B>
where B: Sync,

§

impl<B> Unpin for Tail<B>
where B: Unpin,

§

impl<B> UnwindSafe for Tail<B>
where B: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.