pub struct LayerOptions { /* private fields */ }Expand description
Per-layer behavioral options.
Implementations§
Source§impl LayerOptions
impl LayerOptions
Sourcepub const fn oneshot(&self) -> Option<usize>
pub const fn oneshot(&self) -> Option<usize>
If set, automatically pop the layer after this many keypresses.
Sourcepub const fn unmatched(&self) -> UnmatchedKeys
pub const fn unmatched(&self) -> UnmatchedKeys
Whether unmatched keys are consumed or fall through.
Sourcepub const fn timeout(&self) -> Option<Duration>
pub const fn timeout(&self) -> Option<Duration>
If set, automatically pop the layer after this duration of inactivity.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Human-readable label for this layer, used for overlay grouping.
Sourcepub const fn with_unmatched(self, behavior: UnmatchedKeys) -> Self
pub const fn with_unmatched(self, behavior: UnmatchedKeys) -> Self
Set unmatched key behavior.
Trait Implementations§
Source§impl Clone for LayerOptions
impl Clone for LayerOptions
Source§fn clone(&self) -> LayerOptions
fn clone(&self) -> LayerOptions
Returns a duplicate 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 moreSource§impl Debug for LayerOptions
impl Debug for LayerOptions
Source§impl Default for LayerOptions
impl Default for LayerOptions
Source§fn default() -> LayerOptions
fn default() -> LayerOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LayerOptions
impl<'de> Deserialize<'de> for LayerOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LayerOptions
impl PartialEq for LayerOptions
Source§impl Serialize for LayerOptions
impl Serialize for LayerOptions
impl Eq for LayerOptions
impl StructuralPartialEq for LayerOptions
Auto Trait Implementations§
impl Freeze for LayerOptions
impl RefUnwindSafe for LayerOptions
impl Send for LayerOptions
impl Sync for LayerOptions
impl Unpin for LayerOptions
impl UnsafeUnpin for LayerOptions
impl UnwindSafe for LayerOptions
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