Struct AltRepeatRule
pub struct AltRepeatRule {
pub prev: KeyOutput,
pub emit: KeyOutput,
}Expand description
One alternate-repeat mapping: when the last remembered output equals Self::prev, Key::AltRepeat emits Self::emit.
Fields§
§prev: KeyOutputPrevious resolved output that triggers this rule.
emit: KeyOutputOutput to emit instead of repeating Self::prev.
Implementations§
§impl AltRepeatRule
impl AltRepeatRule
pub const EMPTY: AltRepeatRule
pub const EMPTY: AltRepeatRule
Empty placeholder rule (used to pad fixed-size arrays).
pub const fn new(prev: KeyOutput, emit: KeyOutput) -> AltRepeatRule
pub const fn new(prev: KeyOutput, emit: KeyOutput) -> AltRepeatRule
Constructs a rule.
Trait Implementations§
§impl Clone for AltRepeatRule
impl Clone for AltRepeatRule
§fn clone(&self) -> AltRepeatRule
fn clone(&self) -> AltRepeatRule
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 AltRepeatRule
§impl Debug for AltRepeatRule
impl Debug for AltRepeatRule
§impl<'de> Deserialize<'de> for AltRepeatRule
impl<'de> Deserialize<'de> for AltRepeatRule
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AltRepeatRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AltRepeatRule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for AltRepeatRule
impl PartialEq for AltRepeatRule
impl StructuralPartialEq for AltRepeatRule
Auto Trait Implementations§
impl Freeze for AltRepeatRule
impl RefUnwindSafe for AltRepeatRule
impl Send for AltRepeatRule
impl Sync for AltRepeatRule
impl Unpin for AltRepeatRule
impl UnsafeUnpin for AltRepeatRule
impl UnwindSafe for AltRepeatRule
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