Struct console_menu::MenuProps
source · pub struct MenuProps<'a> {
pub title: &'a str,
pub message: &'a str,
pub bg_color: u8,
pub fg_color: u8,
pub msg_color: u8,
pub exit_on_action: bool,
}Expand description
Stores configuration data passed to a Menu on creation.
Menus use 8-bit colors to ensure widespread terminal support. It should be noted that values from 0-15 will make colors vary based on individual terminal settings.
Configure a subset of properties using the defaults and struct update syntax:
let props = MenuProps {
title: "My Menu",
..MenuProps::default()
}Fields§
§title: &'a strDisplays above the list of menu options. Pass an empty string for no title.
message: &'a strDisplay below the list of menu options. Pass an empty string for no message.
bg_color: u8§fg_color: u8§msg_color: u8§exit_on_action: boolIf true, menu will exit immediately upon an option being selected.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for MenuProps<'a>
impl<'a> Send for MenuProps<'a>
impl<'a> Sync for MenuProps<'a>
impl<'a> Unpin for MenuProps<'a>
impl<'a> UnwindSafe for MenuProps<'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