pub struct Settings {
pub cancel: String,
pub error: String,
pub with_guide: bool,
pub vim_keys: bool,
pub show_hints: bool,
pub bold_header: bool,
pub colors: Colors,
}Expand description
Global prompt settings — colour palette, default messages, key
behaviours. Read with get, mutate with update or
update_colors, replace the colours wholesale with set_colors.
Fields§
§cancel: StringDefault message printed when a spinner is cancelled (Ctrl-C, etc.).
error: StringDefault message printed when a spinner stops with an error.
with_guide: boolWhen false, prompts skip the connector │ bars between rows.
vim_keys: boolWhen true, h/j/k/l act as left/down/up/right inside list prompts.
show_hints: boolWhen true, .hint(...) text is rendered under each prompt.
Off by default — call update(|s| s.show_hints = true) to opt in.
bold_header: boolWhen true, prompt question text (the ◆ <header> line) is bold.
On by default — matches clack, gum, and inquirer.
colors: ColorsColor palette used by the prompt renderer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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