Struct fidl_fuchsia_ui_gfx::ColorRgba
source · #[repr(C)]pub struct ColorRgba {
pub red: u8,
pub green: u8,
pub blue: u8,
pub alpha: u8,
}
Expand description
sRGB color space and nonlinear transfer function.
Fields§
§red: u8
§green: u8
§blue: u8
§alpha: u8
Trait Implementations§
source§impl AsBytes for ColorRgbawhere
u8: AsBytes,
HasPadding<ColorRgba, { _ }>: ShouldBe<{ _ }>,
impl AsBytes for ColorRgbawhere u8: AsBytes, HasPadding<ColorRgba, { _ }>: ShouldBe<{ _ }>,
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl Decode<ColorRgba> for ColorRgba
impl Decode<ColorRgba> for ColorRgba
source§impl<T0: Encode<u8>, T1: Encode<u8>, T2: Encode<u8>, T3: Encode<u8>> Encode<ColorRgba> for (T0, T1, T2, T3)
impl<T0: Encode<u8>, T1: Encode<u8>, T2: Encode<u8>, T3: Encode<u8>> Encode<ColorRgba> for (T0, T1, T2, T3)
source§impl FromBytes for ColorRgbawhere
u8: FromBytes,
impl FromBytes for ColorRgbawhere u8: FromBytes,
§fn read_from_prefix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_prefix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn read_from_suffix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_suffix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Creates an instance of
Self
from zeroed bytes.source§impl Ord for ColorRgba
impl Ord for ColorRgba
source§impl PartialEq<ColorRgba> for ColorRgba
impl PartialEq<ColorRgba> for ColorRgba
source§impl PartialOrd<ColorRgba> for ColorRgba
impl PartialOrd<ColorRgba> for ColorRgba
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for ColorRgba
impl TypeMarker for ColorRgba
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.