#[non_exhaustive]pub enum SampleDepth {
Eight,
Sixteen,
}Expand description
The bits a channel of an encoded image.
This enum is marked #[non_exhaustive] so that depths can be added
without a breaking change.
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.
Eight
8 bits a channel, rounded from any source. Every format writes it.
Sixteen
16 bits a channel, for PNG only. P216, PA16, NA4G and NB4G frames
keep their precision. Eight-bit RGB and alpha samples scale exactly
by 257; YUV sources are converted at 16-bit precision.
Receivers set to ReceiverColorFormat::Best or
ReceiverColorFormat::Best444 get such frames from a
high-bit-depth source.
Trait Implementations§
Source§impl Clone for SampleDepth
impl Clone for SampleDepth
impl Copy for SampleDepth
Source§impl Debug for SampleDepth
impl Debug for SampleDepth
Source§impl Default for SampleDepth
impl Default for SampleDepth
impl Eq for SampleDepth
Source§impl Hash for SampleDepth
impl Hash for SampleDepth
Source§impl PartialEq for SampleDepth
impl PartialEq for SampleDepth
impl StructuralPartialEq for SampleDepth
Auto Trait Implementations§
impl Freeze for SampleDepth
impl RefUnwindSafe for SampleDepth
impl Send for SampleDepth
impl Sync for SampleDepth
impl Unpin for SampleDepth
impl UnsafeUnpin for SampleDepth
impl UnwindSafe for SampleDepth
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