pub struct Help {
pub width: usize,
pub show_all: bool,
pub short_separator: String,
pub full_separator: String,
pub ellipsis: String,
pub styles: Styles,
/* private fields */
}Expand description
Help view model.
Fields§
§width: usizeMaximum width for the help view.
show_all: boolWhether to show full help (vs short help).
short_separator: StringSeparator for short help items.
full_separator: StringSeparator for full help columns.
ellipsis: StringEllipsis shown when help is truncated.
styles: StylesStyles for rendering.
Implementations§
Source§impl Help
impl Help
Sourcepub fn with_bindings(self, bindings: Vec<Binding>) -> Self
pub fn with_bindings(self, bindings: Vec<Binding>) -> Self
Sets the key bindings for standalone Model usage.
Sourcepub fn set_bindings(&mut self, bindings: Vec<Binding>)
pub fn set_bindings(&mut self, bindings: Vec<Binding>)
Sets the key bindings.
Sourcepub fn view(&self, bindings: &[&Binding]) -> String
pub fn view(&self, bindings: &[&Binding]) -> String
Renders the help view for a list of bindings.
Displays short help if show_all is false, full help otherwise.
Sourcepub fn short_help_view(&self, bindings: &[&Binding]) -> String
pub fn short_help_view(&self, bindings: &[&Binding]) -> String
Renders short help from a list of bindings.
Sourcepub fn full_help_view(&self, groups: &[Vec<&Binding>]) -> String
pub fn full_help_view(&self, groups: &[Vec<&Binding>]) -> String
Renders full help from groups of bindings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Help
impl !RefUnwindSafe for Help
impl Send for Help
impl Sync for Help
impl Unpin for Help
impl !UnwindSafe for Help
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