#[repr(u32)]pub enum ColorBlindnessType {
None = 0,
Protanomaly = 1,
Deuteranomaly = 2,
Tritanomaly = 3,
}Variants§
None = 0
No color blindness.
Protanomaly = 1
Red-green color blindness due to reduced sensitivity to red light.
Deuteranomaly = 2
Red-green color blindness due to reduced sensitivity to green light.
Tritanomaly = 3
Blue-yellow color blindness. It is due to reduced sensitivity to blue light.
Implementations§
Source§impl ColorBlindnessType
impl ColorBlindnessType
pub fn from_primitive(prim: u32) -> Option<ColorBlindnessType>
pub const fn into_primitive(self) -> u32
Trait Implementations§
Source§impl Clone for ColorBlindnessType
impl Clone for ColorBlindnessType
Source§fn clone(&self) -> ColorBlindnessType
fn clone(&self) -> ColorBlindnessType
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 ColorBlindnessType
impl Debug for ColorBlindnessType
Source§impl<D> Decode<ColorBlindnessType, D> for ColorBlindnessTypewhere
D: ResourceDialect,
impl<D> Decode<ColorBlindnessType, D> for ColorBlindnessTypewhere
D: ResourceDialect,
Source§fn new_empty() -> ColorBlindnessType
fn new_empty() -> ColorBlindnessType
Creates a valid instance of
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<ColorBlindnessType, D> for ColorBlindnessTypewhere
D: ResourceDialect,
impl<D> Encode<ColorBlindnessType, D> for ColorBlindnessTypewhere
D: ResourceDialect,
Source§impl Hash for ColorBlindnessType
impl Hash for ColorBlindnessType
Source§impl Ord for ColorBlindnessType
impl Ord for ColorBlindnessType
Source§fn cmp(&self, other: &ColorBlindnessType) -> Ordering
fn cmp(&self, other: &ColorBlindnessType) -> Ordering
1.21.0 · 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
Source§impl PartialEq for ColorBlindnessType
impl PartialEq for ColorBlindnessType
Source§impl PartialOrd for ColorBlindnessType
impl PartialOrd for ColorBlindnessType
Source§impl TypeMarker for ColorBlindnessType
impl TypeMarker for ColorBlindnessType
Source§type Owned = ColorBlindnessType
type Owned = ColorBlindnessType
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for ColorBlindnessType
impl ValueTypeMarker for ColorBlindnessType
Source§type Borrowed<'a> = ColorBlindnessType
type Borrowed<'a> = ColorBlindnessType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<ColorBlindnessType as TypeMarker>::Owned,
) -> <ColorBlindnessType as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ColorBlindnessType as TypeMarker>::Owned, ) -> <ColorBlindnessType as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.impl Copy for ColorBlindnessType
impl Eq for ColorBlindnessType
impl StructuralPartialEq for ColorBlindnessType
Auto Trait Implementations§
impl Freeze for ColorBlindnessType
impl RefUnwindSafe for ColorBlindnessType
impl Send for ColorBlindnessType
impl Sync for ColorBlindnessType
impl Unpin for ColorBlindnessType
impl UnwindSafe for ColorBlindnessType
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