Skip to main content

Option

Type Alias Option 

Source
pub type Option = Box<dyn FnOnce(&mut Model)>;
Expand description

Option is used to set options in new. For example:

let progress = progress::new(vec![
    progress::with_colors(&[Color::parse("#5A56E0"), Color::parse("#EE6FF8")]),
    progress::without_percentage(),
]);

Option is the type of configuration option that can be passed to new. (Named Option to mirror upstream; use std::option::Option for optional values.)

Aliased Typeยง

pub struct Option(/* private fields */);