pub enum TextEditingConvention {
Standard,
Apple,
}Expand description
Host text-editing conventions used by platform input controllers.
This is supplied by the runtime rather than inferred from the Rust target: a WebAssembly application can be running on either an Apple or non-Apple host.
Variants§
Standard
Control is the primary shortcut and word-navigation modifier.
Apple
Command is the primary shortcut, Option navigates by word, and the conventional Control-based line-editing commands are available.
Implementations§
Source§impl TextEditingConvention
impl TextEditingConvention
pub const fn is_apple(self) -> bool
pub const fn primary_shortcut_modifier(self) -> u8
pub const fn has_primary_shortcut(self, modifiers: u8) -> bool
pub const fn has_word_modifier(self, modifiers: u8) -> bool
Trait Implementations§
Source§impl Clone for TextEditingConvention
impl Clone for TextEditingConvention
Source§fn clone(&self) -> TextEditingConvention
fn clone(&self) -> TextEditingConvention
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 TextEditingConvention
Source§impl Debug for TextEditingConvention
impl Debug for TextEditingConvention
Source§impl Default for TextEditingConvention
impl Default for TextEditingConvention
Source§fn default() -> TextEditingConvention
fn default() -> TextEditingConvention
Returns the “default value” for a type. Read more
impl Eq for TextEditingConvention
Source§impl PartialEq for TextEditingConvention
impl PartialEq for TextEditingConvention
impl StructuralPartialEq for TextEditingConvention
Auto Trait Implementations§
impl Freeze for TextEditingConvention
impl RefUnwindSafe for TextEditingConvention
impl Send for TextEditingConvention
impl Sync for TextEditingConvention
impl Unpin for TextEditingConvention
impl UnsafeUnpin for TextEditingConvention
impl UnwindSafe for TextEditingConvention
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.