pub struct Model {
pub show_all: bool,
pub short_separator: String,
pub full_separator: String,
pub ellipsis: String,
pub styles: Styles,
/* private fields */
}Expand description
Model contains the state of the help view.
Fields§
§show_all: boolif true, render the “full” help menu
short_separator: StringThe separator used in the short help.
full_separator: StringThe separator used in the full help.
ellipsis: StringThe symbol we use in the short help when help items have been truncated due to width. Periods of ellipsis by default.
styles: StylesThe styles used by the help view.
Implementations§
Source§impl Model
impl Model
Sourcepub fn update(&mut self, _msg: &dyn Msg) -> Cmd
pub fn update(&mut self, _msg: &dyn Msg) -> Cmd
Update helps satisfy the Bubble Tea Model interface. It’s a no-op.
Sourcepub fn short_help_view(&self, bindings: &[Binding]) -> String
pub fn short_help_view(&self, bindings: &[Binding]) -> String
ShortHelpView renders a single line help view from a slice of keybindings. If the line is longer than the maximum width it will be gracefully truncated, showing only as many help items as possible.
Sourcepub fn full_help_view(&self, groups: &[Vec<Binding>]) -> String
pub fn full_help_view(&self, groups: &[Vec<Binding>]) -> String
FullHelpView renders help columns from a slice of key binding slices. Each top level slice entry renders into a column.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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