Enum KeyboardEventPhase
pub enum KeyboardEventPhase {
Pressed,
Released,
Cancelled,
Repeat,
// some variants omitted
}
Variants§
Pressed
When key is pressed down.
Released
When key is released.
Cancelled
This key PRESSED
is not directed to this input client anymore.
Repeat
Whether this is an automatically generated key repeat
Implementations§
§impl KeyboardEventPhase
impl KeyboardEventPhase
pub fn from_primitive(prim: u32) -> Option<KeyboardEventPhase>
pub fn from_primitive_allow_unknown(prim: u32) -> KeyboardEventPhase
pub fn unknown() -> KeyboardEventPhase
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for KeyboardEventPhase
impl Clone for KeyboardEventPhase
§fn clone(&self) -> KeyboardEventPhase
fn clone(&self) -> KeyboardEventPhase
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 more§impl Debug for KeyboardEventPhase
impl Debug for KeyboardEventPhase
§impl<D> Decode<KeyboardEventPhase, D> for KeyboardEventPhasewhere
D: ResourceDialect,
impl<D> Decode<KeyboardEventPhase, D> for KeyboardEventPhasewhere
D: ResourceDialect,
§fn new_empty() -> KeyboardEventPhase
fn new_empty() -> KeyboardEventPhase
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<KeyboardEventPhase, D> for KeyboardEventPhasewhere
D: ResourceDialect,
impl<D> Encode<KeyboardEventPhase, D> for KeyboardEventPhasewhere
D: ResourceDialect,
§impl Hash for KeyboardEventPhase
impl Hash for KeyboardEventPhase
§impl Ord for KeyboardEventPhase
impl Ord for KeyboardEventPhase
§fn cmp(&self, other: &KeyboardEventPhase) -> Ordering
fn cmp(&self, other: &KeyboardEventPhase) -> 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
§impl PartialEq for KeyboardEventPhase
impl PartialEq for KeyboardEventPhase
§impl PartialOrd for KeyboardEventPhase
impl PartialOrd for KeyboardEventPhase
§impl TypeMarker for KeyboardEventPhase
impl TypeMarker for KeyboardEventPhase
§type Owned = KeyboardEventPhase
type Owned = KeyboardEventPhase
The owned Rust type which this FIDL type decodes into.
§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 KeyboardEventPhase
impl ValueTypeMarker for KeyboardEventPhase
§type Borrowed<'a> = KeyboardEventPhase
type Borrowed<'a> = KeyboardEventPhase
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<KeyboardEventPhase as TypeMarker>::Owned,
) -> <KeyboardEventPhase as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<KeyboardEventPhase as TypeMarker>::Owned, ) -> <KeyboardEventPhase as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for KeyboardEventPhase
impl Eq for KeyboardEventPhase
impl StructuralPartialEq for KeyboardEventPhase
Auto Trait Implementations§
impl Freeze for KeyboardEventPhase
impl RefUnwindSafe for KeyboardEventPhase
impl Send for KeyboardEventPhase
impl Sync for KeyboardEventPhase
impl Unpin for KeyboardEventPhase
impl UnwindSafe for KeyboardEventPhase
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