pub enum AudioBytes<'a> {
Borrowed(&'a [u8]),
Owned(Vec<u8>),
}Expand description
Borrowed-or-owned byte view returned by AudioData::bytes.
Variants§
Borrowed(&'a [u8])
Zero-copy view into the underlying contiguous buffer.
Owned(Vec<u8>)
Owned buffer when a borrow is impossible (e.g., I24 packing).
Implementations§
Trait Implementations§
Source§impl<'a> Clone for AudioBytes<'a>
impl<'a> Clone for AudioBytes<'a>
Source§fn clone(&self) -> AudioBytes<'a>
fn clone(&self) -> AudioBytes<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for AudioBytes<'a>
impl<'a> RefUnwindSafe for AudioBytes<'a>
impl<'a> Send for AudioBytes<'a>
impl<'a> Sync for AudioBytes<'a>
impl<'a> Unpin for AudioBytes<'a>
impl<'a> UnwindSafe for AudioBytes<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more