pub struct SampleBitDepth(/* private fields */);Expand description
Checked planar sample bit depth for raw frame formats.
Implementations§
Source§impl SampleBitDepth
impl SampleBitDepth
Sourcepub const fn new(bits: u8) -> Option<Self>
pub const fn new(bits: u8) -> Option<Self>
Create a bit depth in the supported 8 through 16 bit range.
Sourcepub const fn from_bits(bits: u8) -> Option<Self>
pub const fn from_bits(bits: u8) -> Option<Self>
Alias for SampleBitDepth::new.
Sourcepub fn bytes_per_sample(self) -> usize
pub fn bytes_per_sample(self) -> usize
Number of bytes used to store one sample.
Sourcepub fn max_sample(self) -> u16
pub fn max_sample(self) -> u16
Maximum legal sample value for this bit depth.
Trait Implementations§
Source§impl Clone for SampleBitDepth
impl Clone for SampleBitDepth
impl Copy for SampleBitDepth
Source§impl Debug for SampleBitDepth
impl Debug for SampleBitDepth
impl Eq for SampleBitDepth
Source§impl Ord for SampleBitDepth
impl Ord for SampleBitDepth
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SampleBitDepth
impl PartialEq for SampleBitDepth
Source§impl PartialOrd for SampleBitDepth
impl PartialOrd for SampleBitDepth
impl StructuralPartialEq for SampleBitDepth
Auto Trait Implementations§
impl Forget for SampleBitDepth
impl Freeze for SampleBitDepth
impl RefUnwindSafe for SampleBitDepth
impl Send for SampleBitDepth
impl Sync for SampleBitDepth
impl Unpin for SampleBitDepth
impl UnsafeUnpin for SampleBitDepth
impl UnwindSafe for SampleBitDepth
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