Skip to main content

PrefetchedAudioPacketProvider

Struct PrefetchedAudioPacketProvider 

Source
pub struct PrefetchedAudioPacketProvider { /* private fields */ }
Expand description

An AudioPacketProvider that answers from a TrackSampleLoader’s cache and reports ErrorKind::WouldBlock for a packet that is not loaded yet.

Trait Implementations§

Source§

impl AudioPacketProvider for PrefetchedAudioPacketProvider

Source§

fn len(&self) -> usize

The number of packets.
Source§

fn decoded_range(&self, index: usize) -> SampleRange

Source§

fn read(&self, index: usize) -> Result<Cow<'_, [u8]>>

Returns the compressed bytes of one packet.
Source§

fn is_empty(&self) -> bool

Auto Trait Implementations§

§

impl Forget for PrefetchedAudioPacketProvider

§

impl Freeze for PrefetchedAudioPacketProvider
where *const u8 is !null: Freeze, PhantomData<SampleRange>: Freeze, *const ArcInner<Mutex<CacheState>> is !null: Freeze, PhantomData<ArcInner<Mutex<CacheState>>>: Freeze,

§

impl Move for PrefetchedAudioPacketProvider

§

impl RefUnwindSafe for PrefetchedAudioPacketProvider

§

impl Send for PrefetchedAudioPacketProvider
where RawVecInner: Send, Arc<Mutex<CacheState>>: Send,

§

impl Sync for PrefetchedAudioPacketProvider
where RawVecInner: Sync, Arc<Mutex<CacheState>>: Sync,

§

impl Unpin for PrefetchedAudioPacketProvider
where *const u8 is !null: Unpin, Arc<Mutex<CacheState>>: Unpin,

§

impl UnsafeUnpin for PrefetchedAudioPacketProvider
where *const u8 is !null: UnsafeUnpin, PhantomData<SampleRange>: UnsafeUnpin, *const ArcInner<Mutex<CacheState>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<CacheState>>>: UnsafeUnpin,

§

impl UnwindSafe for PrefetchedAudioPacketProvider
where RawVecInner: UnwindSafe, Arc<Mutex<CacheState>>: 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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.