#[repr(u32)]pub enum CompositionMode {
Invisible = 1,
Image = 2,
SolidColor = 3,
}Expand description
Selects what a Layer composites: an image, a solid color, or nothing at all.
INVISIBLE is the freshly-created state. An INVISIBLE layer keeps its place in any
LayerStack which references it, but contributes nothing to the frame. Because layer
properties are sticky (see LayerProperties), passing through INVISIBLE and back
loses nothing.
Variants§
Implementations§
Source§impl CompositionMode
impl CompositionMode
pub fn from_primitive(prim: u32) -> Option<CompositionMode>
pub const fn into_primitive(self) -> u32
Trait Implementations§
Source§impl Clone for CompositionMode
impl Clone for CompositionMode
Source§fn clone(&self) -> CompositionMode
fn clone(&self) -> CompositionMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompositionMode
Source§impl Debug for CompositionMode
impl Debug for CompositionMode
Source§impl<D> Decode<CompositionMode, D> for CompositionModewhere
D: ResourceDialect,
impl<D> Decode<CompositionMode, D> for CompositionModewhere
D: ResourceDialect,
Source§fn new_empty() -> CompositionMode
fn new_empty() -> CompositionMode
Creates a valid instance of
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<CompositionMode, D> for CompositionModewhere
D: ResourceDialect,
impl<D> Encode<CompositionMode, D> for CompositionModewhere
D: ResourceDialect,
impl Eq for CompositionMode
Source§impl Hash for CompositionMode
impl Hash for CompositionMode
Source§impl Ord for CompositionMode
impl Ord for CompositionMode
Source§fn cmp(&self, other: &CompositionMode) -> Ordering
fn cmp(&self, other: &CompositionMode) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CompositionMode
impl PartialEq for CompositionMode
Source§impl PartialOrd for CompositionMode
impl PartialOrd for CompositionMode
impl StructuralPartialEq for CompositionMode
Source§impl TypeMarker for CompositionMode
impl TypeMarker for CompositionMode
Source§type Owned = CompositionMode
type Owned = CompositionMode
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 CompositionMode
impl ValueTypeMarker for CompositionMode
Source§type Borrowed<'a> = CompositionMode
type Borrowed<'a> = CompositionMode
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: &<CompositionMode as TypeMarker>::Owned,
) -> <CompositionMode as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<CompositionMode as TypeMarker>::Owned, ) -> <CompositionMode as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned to Self::Borrowed.Auto Trait Implementations§
impl Freeze for CompositionMode
impl RefUnwindSafe for CompositionMode
impl Send for CompositionMode
impl Sync for CompositionMode
impl Unpin for CompositionMode
impl UnsafeUnpin for CompositionMode
impl UnwindSafe for CompositionMode
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