Enum Color
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§
§impl Color
impl Color
pub fn from_primitive(prim: u32) -> Option<Color>
pub fn from_primitive_allow_unknown(prim: u32) -> Color
pub fn unknown() -> Color
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl<D> Decode<Color, D> for Colorwhere
D: ResourceDialect,
impl<D> Decode<Color, D> for Colorwhere
D: ResourceDialect,
§impl Ord for Color
impl Ord for Color
§impl PartialOrd for Color
impl PartialOrd for Color
§impl TypeMarker for Color
impl TypeMarker for Color
§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.
§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
.§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 more§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.§impl ValueTypeMarker for Color
impl ValueTypeMarker for Color
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