pub struct KeyTableActivation {
pub name: String,
pub table: KeyTable,
pub mode: ActivateKeyTableMode,
pub timeout: Option<Instant>,
pub replace_current: bool,
}Expand description
An activation of a key table on the stack
Fields§
§name: StringName of the activated table
table: KeyTableThe key table itself
mode: ActivateKeyTableModeActivation mode
timeout: Option<Instant>Optional timeout (absolute time when this activation expires)
replace_current: boolWhether this activation replaces the previous one
Implementations§
Source§impl KeyTableActivation
impl KeyTableActivation
Sourcepub fn persistent(name: String, table: KeyTable) -> Self
pub fn persistent(name: String, table: KeyTable) -> Self
Create a new persistent activation
Sourcepub fn timed(
name: String,
table: KeyTable,
duration: Duration,
now: Instant,
) -> Self
pub fn timed( name: String, table: KeyTable, duration: Duration, now: Instant, ) -> Self
Create a new timed activation
Sourcepub fn with_replace(self, replace: bool) -> Self
pub fn with_replace(self, replace: bool) -> Self
Set whether this activation should replace the current one
Trait Implementations§
Source§impl Clone for KeyTableActivation
impl Clone for KeyTableActivation
Source§fn clone(&self) -> KeyTableActivation
fn clone(&self) -> KeyTableActivation
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 KeyTableActivation
impl Debug for KeyTableActivation
Source§impl<'de> Deserialize<'de> for KeyTableActivation
impl<'de> Deserialize<'de> for KeyTableActivation
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
Auto Trait Implementations§
impl Freeze for KeyTableActivation
impl RefUnwindSafe for KeyTableActivation
impl Send for KeyTableActivation
impl Sync for KeyTableActivation
impl Unpin for KeyTableActivation
impl UnsafeUnpin for KeyTableActivation
impl UnwindSafe for KeyTableActivation
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.