pub enum Color {
Black,
Red,
Green,
Blue,
Yellow,
Magenta,
Cyan,
White,
// some variants omitted
}
Expand description
Defines the color of a piece of visual content.
We limit the palette to fully saturated colors to simplify verification with screenshots.
Variants§
Black
0x000000
Red
0xFF0000
Green
0x00FF00
Blue
0x0000FF
Yellow
0xFFFF00
Magenta
0xFF00FF
Cyan
0x00FFFF
White
0xFFFFFF
Implementations§
Trait Implementations§
Source§impl<D> Decode<Color, D> for Colorwhere
D: ResourceDialect,
impl<D> Decode<Color, D> for Colorwhere
D: ResourceDialect,
Source§impl Ord for Color
impl Ord for Color
Source§impl PartialOrd for Color
impl PartialOrd for Color
Source§impl TypeMarker for Color
impl TypeMarker for Color
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 Color
impl ValueTypeMarker for Color
Source§type Borrowed<'a> = Color
type Borrowed<'a> = Color
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: &<Color as TypeMarker>::Owned,
) -> <Color as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<Color as TypeMarker>::Owned, ) -> <Color as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for Color
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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