#[non_exhaustive]pub enum DepthPolicy {
Round,
Truncate,
Forbid,
}Expand description
Policy for bit depth reduction (U16→U8, etc.).
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.
Round
Round to nearest value.
Truncate
Truncate (floor). Faster, biased toward lower values.
Forbid
Return error rather than reducing depth.
Trait Implementations§
Source§impl Clone for DepthPolicy
impl Clone for DepthPolicy
Source§fn clone(&self) -> DepthPolicy
fn clone(&self) -> DepthPolicy
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 moreSource§impl Debug for DepthPolicy
impl Debug for DepthPolicy
Source§impl Hash for DepthPolicy
impl Hash for DepthPolicy
Source§impl PartialEq for DepthPolicy
impl PartialEq for DepthPolicy
impl Copy for DepthPolicy
impl Eq for DepthPolicy
impl StructuralPartialEq for DepthPolicy
Auto Trait Implementations§
impl Freeze for DepthPolicy
impl RefUnwindSafe for DepthPolicy
impl Send for DepthPolicy
impl Sync for DepthPolicy
impl Unpin for DepthPolicy
impl UnsafeUnpin for DepthPolicy
impl UnwindSafe for DepthPolicy
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