#[non_exhaustive]
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
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§
source§impl InputMethodAction
impl InputMethodAction
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
source§impl Clone for InputMethodAction
impl Clone for InputMethodAction
source§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 moresource§impl Debug for InputMethodAction
impl Debug for InputMethodAction
source§impl Decodable for InputMethodAction
impl Decodable for InputMethodAction
source§fn decode(
&mut self,
decoder: &mut Decoder<'_>,
offset: usize
) -> Result<(), Error>
fn decode( &mut self, decoder: &mut Decoder<'_>, offset: usize ) -> Result<(), Error>
self
.
Callers must ensure that offset
is a multiple of
Layout::inline_align
, and that decoder.buf
has room for reading
Layout::inline_size
bytes at offset
. Read moresource§impl Encodable for InputMethodAction
impl Encodable for InputMethodAction
source§fn encode(
&mut self,
encoder: &mut Encoder<'_, '_>,
offset: usize,
recursion_depth: usize
) -> Result<(), Error>
fn encode( &mut self, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize ) -> Result<(), Error>
Handle::INVALID
. Callers must ensure that offset
is a
multiple of Layout::inline_align
, and that encoder.buf
has room for
writing Layout::inline_size
bytes at offset
. Read moresource§impl Hash for InputMethodAction
impl Hash for InputMethodAction
source§impl Layout for InputMethodAction
impl Layout for InputMethodAction
source§fn inline_align(context: &Context) -> usize
fn inline_align(context: &Context) -> usize
source§fn inline_size(context: &Context) -> usize
fn inline_size(context: &Context) -> usize
inline_align
.§fn supports_simple_copy() -> boolwhere
Self: Sized,
fn supports_simple_copy() -> boolwhere Self: Sized,
source§impl Ord for InputMethodAction
impl Ord for InputMethodAction
source§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,
source§impl PartialEq<InputMethodAction> for InputMethodAction
impl PartialEq<InputMethodAction> for InputMethodAction
source§fn eq(&self, other: &InputMethodAction) -> bool
fn eq(&self, other: &InputMethodAction) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InputMethodAction> for InputMethodAction
impl PartialOrd<InputMethodAction> for InputMethodAction
source§fn partial_cmp(&self, other: &InputMethodAction) -> Option<Ordering>
fn partial_cmp(&self, other: &InputMethodAction) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for InputMethodAction
impl Eq for InputMethodAction
impl StructuralEq for InputMethodAction
impl StructuralPartialEq for InputMethodAction
Auto Trait Implementations§
impl RefUnwindSafe for InputMethodAction
impl Send for InputMethodAction
impl Sync for InputMethodAction
impl Unpin for InputMethodAction
impl UnwindSafe for InputMethodAction
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutObject for Twhere
T: Layout,
impl<T> LayoutObject for Twhere T: Layout,
§fn inline_align(&self, context: &Context) -> usize
fn inline_align(&self, context: &Context) -> usize
Layout::inline_align
.§fn inline_size(&self, context: &Context) -> usize
fn inline_size(&self, context: &Context) -> usize
Layout::inline_size
.