#[non_exhaustive]pub enum SoftKeyboardSupport {
None,
ViaAccessibility,
Explicit,
}Expand description
How a platform can be asked to raise the on-screen keyboard.
Re-exported from teksilo-core, where it lives so that
WindowOps::soft_keyboard_support
can carry it to a widget without the widget layer depending on this crate.
The per-platform values, and the reason behind each, are in
crate::soft_keyboard.
What a platform can do about an on-screen keyboard.
Three answers, and the difference between them is what a caller may promise a user, not how much code stands behind them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
The framework has no keyboard request to send, and makes no promise that anything will rise on its own. Either the platform has no software keyboard at all, or it has one whose appearance is the platform’s business and not reliable enough to promise. A request is dropped, and a text surface driven by touch needs its own affordance.
ViaAccessibility
A keyboard exists and is guaranteed to rise when a text control takes focus through the accessibility layer, so a touch-driven text surface needs no affordance of its own. There is still nothing to ask: the framework’s ordinary IME-allowance reconcile is what summons it, and an explicit ask would at best duplicate that and at worst re-assert allowance, which cancels a live composition — so a request resolves to “already done”.
The guarantee is what separates this from None, which
covers every platform where a keyboard may or may not appear.
Explicit
A keyboard exists and can be shown and hidden on demand. Only a backend that can honour both directions may report this: a toggle whose current state is unknown cannot, because “show” would sometimes hide.
Trait Implementations§
Source§impl Clone for SoftKeyboardSupport
impl Clone for SoftKeyboardSupport
Source§fn clone(&self) -> SoftKeyboardSupport
fn clone(&self) -> SoftKeyboardSupport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SoftKeyboardSupport
Source§impl Debug for SoftKeyboardSupport
impl Debug for SoftKeyboardSupport
Source§impl Default for SoftKeyboardSupport
impl Default for SoftKeyboardSupport
Source§fn default() -> SoftKeyboardSupport
fn default() -> SoftKeyboardSupport
impl Eq for SoftKeyboardSupport
Source§impl Hash for SoftKeyboardSupport
impl Hash for SoftKeyboardSupport
Source§impl PartialEq for SoftKeyboardSupport
impl PartialEq for SoftKeyboardSupport
impl StructuralPartialEq for SoftKeyboardSupport
Auto Trait Implementations§
impl Freeze for SoftKeyboardSupport
impl RefUnwindSafe for SoftKeyboardSupport
impl Send for SoftKeyboardSupport
impl Sync for SoftKeyboardSupport
impl Unpin for SoftKeyboardSupport
impl UnsafeUnpin for SoftKeyboardSupport
impl UnwindSafe for SoftKeyboardSupport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.