#[non_exhaustive]pub enum CpuTileData {
U8(Arc<Vec<u8>>),
U16(Arc<Vec<u16>>),
F32(Arc<Vec<f32>>),
}Expand description
Typed, aligned sample storage.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl CpuTileData
impl CpuTileData
pub fn u8(samples: Vec<u8>) -> Self
pub fn u16(samples: Vec<u16>) -> Self
pub fn f32(samples: Vec<f32>) -> Self
pub fn sample_type(&self) -> SampleType
pub fn byte_size(&self) -> usize
pub fn as_u8(&self) -> Option<&[u8]>
pub fn as_u16(&self) -> Option<&[u16]>
pub fn as_f32(&self) -> Option<&[f32]>
pub fn make_mut_u8(&mut self) -> Option<&mut Vec<u8>>
pub fn make_mut_u16(&mut self) -> Option<&mut Vec<u16>>
pub fn make_mut_f32(&mut self) -> Option<&mut Vec<f32>>
Trait Implementations§
Source§impl Clone for CpuTileData
impl Clone for CpuTileData
Source§fn clone(&self) -> CpuTileData
fn clone(&self) -> CpuTileData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for CpuTileData
impl RefUnwindSafe for CpuTileData
impl Send for CpuTileData
impl Sync for CpuTileData
impl Unpin for CpuTileData
impl UnsafeUnpin for CpuTileData
impl UnwindSafe for CpuTileData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more