pub struct Description<'a> {
pub text: Option<&'a Text>,
pub keys: KeyDescriptions<'a>,
}Expand description
The description for KeyEvents that are mapped or bound in a
Mode
This description will include an explaining Text as well as
an Iterator, which returns one of the following:
- A sequence of
KeyEvents that are mapped to the action - A list of
Bindings that are bound to the action
The first one happens when you call map or alias, since
they let you map a sequence of KeyEvents.
The second one comes from a Modes own Bindings from
Mode::bindings. This is a list of patterns for KeyEvents
that are bound to actions. This list is immutable, and each item
is an alternation of patterns (e.g. 'a'..='z', “any media
key”, concrete KeyEvents, etc).
One other thing to note is that
Fields§
§text: Option<&'a Text>§keys: KeyDescriptions<'a>Auto Trait Implementations§
impl<'a> Freeze for Description<'a>
impl<'a> !RefUnwindSafe for Description<'a>
impl<'a> Send for Description<'a>
impl<'a> Sync for Description<'a>
impl<'a> Unpin for Description<'a>
impl<'a> UnsafeUnpin for Description<'a>
impl<'a> !UnwindSafe for Description<'a>
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