#[repr(u32)]pub enum AlphaFormat {
Opaque = 0,
Premultiplied = 1,
NonPremultiplied = 2,
}
Expand description
Specifies how alpha information should be interpreted.
Variants§
Opaque = 0
Image is considered to be opaque. Alpha channel is ignored. Blend function is: src.RGB
Premultiplied = 1
Color channels have been premultiplied by alpha. Blend function is: src.RGB + (dest.RGB * (1 - src.A))
NonPremultiplied = 2
Color channels have not been premultiplied by alpha. Blend function is: (src.RGB * src.A) + (dest.RGB * (1 - src.A))
Implementations§
Source§impl AlphaFormat
impl AlphaFormat
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for AlphaFormat
impl Clone for AlphaFormat
Source§fn clone(&self) -> AlphaFormat
fn clone(&self) -> AlphaFormat
Returns a copy 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 AlphaFormat
impl Debug for AlphaFormat
Source§impl<D: ResourceDialect> Decode<AlphaFormat, D> for AlphaFormat
impl<D: ResourceDialect> Decode<AlphaFormat, D> for AlphaFormat
Source§impl<D: ResourceDialect> Encode<AlphaFormat, D> for AlphaFormat
impl<D: ResourceDialect> Encode<AlphaFormat, D> for AlphaFormat
Source§impl Hash for AlphaFormat
impl Hash for AlphaFormat
Source§impl Ord for AlphaFormat
impl Ord for AlphaFormat
Source§fn cmp(&self, other: &AlphaFormat) -> Ordering
fn cmp(&self, other: &AlphaFormat) -> 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 AlphaFormat
impl PartialEq for AlphaFormat
Source§impl PartialOrd for AlphaFormat
impl PartialOrd for AlphaFormat
Source§impl TypeMarker for AlphaFormat
impl TypeMarker for AlphaFormat
Source§type Owned = AlphaFormat
type Owned = AlphaFormat
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 AlphaFormat
impl ValueTypeMarker for AlphaFormat
Source§type Borrowed<'a> = AlphaFormat
type Borrowed<'a> = AlphaFormat
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for AlphaFormat
impl Eq for AlphaFormat
impl StructuralPartialEq for AlphaFormat
Auto Trait Implementations§
impl Freeze for AlphaFormat
impl RefUnwindSafe for AlphaFormat
impl Send for AlphaFormat
impl Sync for AlphaFormat
impl Unpin for AlphaFormat
impl UnwindSafe for AlphaFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)