Enum InputMethodAction
pub enum InputMethodAction {
Unspecified,
None,
Go,
Search,
Send,
Next,
Done,
Previous,
Newline,
// some variants omitted
}
Expand description
Determines what happens if the “action” key is pressed on the keyboard, typically would either be the “Enter” key on a physical keyboard, or an action button on a virtual keyboard, which is usually placed where Enter would be, but with a custom label.
Variants§
Unspecified
The method action was not specified at all.
None
No special action is requested.
Go
The action is “Go”, e.g. execute a command.
Search
The action is to invoke a search.
Send
The action is to invoke “send”, e.g. if this is an email or a SMS message.
Next
The action is to move to the next field in the focus sequence.
Done
The action is to end the text editing.
Previous
The action is to move to the previous field in the focus sequence.
Newline
Pressing the action key inserts a new line into the text field. In contrast to other values, which all stop editing and invoke a specific action.
Implementations§
§impl InputMethodAction
impl InputMethodAction
pub fn from_primitive(prim: u32) -> Option<InputMethodAction>
pub fn from_primitive_allow_unknown(prim: u32) -> InputMethodAction
pub fn unknown() -> InputMethodAction
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for InputMethodAction
impl Clone for InputMethodAction
§fn clone(&self) -> InputMethodAction
fn clone(&self) -> InputMethodAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for InputMethodAction
impl Debug for InputMethodAction
§impl<D> Decode<InputMethodAction, D> for InputMethodActionwhere
D: ResourceDialect,
impl<D> Decode<InputMethodAction, D> for InputMethodActionwhere
D: ResourceDialect,
§fn new_empty() -> InputMethodAction
fn new_empty() -> InputMethodAction
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<InputMethodAction, D> for InputMethodActionwhere
D: ResourceDialect,
impl<D> Encode<InputMethodAction, D> for InputMethodActionwhere
D: ResourceDialect,
§impl Hash for InputMethodAction
impl Hash for InputMethodAction
§impl Ord for InputMethodAction
impl Ord for InputMethodAction
§fn cmp(&self, other: &InputMethodAction) -> Ordering
fn cmp(&self, other: &InputMethodAction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for InputMethodAction
impl PartialEq for InputMethodAction
§impl PartialOrd for InputMethodAction
impl PartialOrd for InputMethodAction
§impl TypeMarker for InputMethodAction
impl TypeMarker for InputMethodAction
§type Owned = InputMethodAction
type Owned = InputMethodAction
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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 InputMethodAction
impl ValueTypeMarker for InputMethodAction
§type Borrowed<'a> = InputMethodAction
type Borrowed<'a> = InputMethodAction
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<InputMethodAction as TypeMarker>::Owned,
) -> <InputMethodAction as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<InputMethodAction as TypeMarker>::Owned, ) -> <InputMethodAction as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.