pub struct KeyHintsProps {
pub hints: Vec<KeyHint>,
pub separator: KeyHintSeparator,
pub style: KeyHintStyle,
pub key_color: Option<Color>,
pub action_color: Option<Color>,
pub separator_color: Option<Color>,
pub bold_keys: bool,
pub dim_actions: bool,
}Expand description
Properties for the KeyHints component.
Fields§
§hints: Vec<KeyHint>List of key hints to display.
separator: KeyHintSeparatorSeparator between hints.
style: KeyHintStyleDisplay style.
key_color: Option<Color>Color for the key portion.
action_color: Option<Color>Color for the action/description portion.
separator_color: Option<Color>Color for the separator.
bold_keys: boolWhether to bold the keys.
dim_actions: boolWhether to dim the actions.
Implementations§
Source§impl KeyHintsProps
impl KeyHintsProps
Sourcepub fn separator(self, separator: KeyHintSeparator) -> Self
pub fn separator(self, separator: KeyHintSeparator) -> Self
Set the separator style.
Sourcepub fn style(self, style: KeyHintStyle) -> Self
pub fn style(self, style: KeyHintStyle) -> Self
Set the display style.
Sourcepub fn action_color(self, color: Color) -> Self
pub fn action_color(self, color: Color) -> Self
Set the action color.
Sourcepub fn separator_color(self, color: Color) -> Self
pub fn separator_color(self, color: Color) -> Self
Set the separator color.
Sourcepub fn dim_actions(self, dim: bool) -> Self
pub fn dim_actions(self, dim: bool) -> Self
Enable/disable dim actions.
Sourcepub fn render_string(&self) -> String
pub fn render_string(&self) -> String
Render the hints as a string.
Trait Implementations§
Source§impl Clone for KeyHintsProps
impl Clone for KeyHintsProps
Source§fn clone(&self) -> KeyHintsProps
fn clone(&self) -> KeyHintsProps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyHintsProps
impl Debug for KeyHintsProps
Auto Trait Implementations§
impl Freeze for KeyHintsProps
impl RefUnwindSafe for KeyHintsProps
impl Send for KeyHintsProps
impl Sync for KeyHintsProps
impl Unpin for KeyHintsProps
impl UnwindSafe for KeyHintsProps
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