pub struct HelpEntry {
pub key: String,
pub desc: String,
pub enabled: bool,
pub category: HelpCategory,
}Expand description
A single keybinding entry in the help view.
Fields§
§key: StringThe key or key combination (e.g. “^C”, “↑/k”).
desc: StringDescription of what the key does.
enabled: boolWhether this entry is enabled (disabled entries are hidden).
category: HelpCategoryCategory for grouping related entries.
Implementations§
Source§impl HelpEntry
impl HelpEntry
Sourcepub fn new(key: impl Into<String>, desc: impl Into<String>) -> Self
pub fn new(key: impl Into<String>, desc: impl Into<String>) -> Self
Create a new enabled help entry.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set whether this entry is enabled.
Sourcepub fn with_category(self, category: HelpCategory) -> Self
pub fn with_category(self, category: HelpCategory) -> Self
Set the category for this entry.
Trait Implementations§
impl Eq for HelpEntry
impl StructuralPartialEq for HelpEntry
Auto Trait Implementations§
impl Freeze for HelpEntry
impl RefUnwindSafe for HelpEntry
impl Send for HelpEntry
impl Sync for HelpEntry
impl Unpin for HelpEntry
impl UnsafeUnpin for HelpEntry
impl UnwindSafe for HelpEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.