pub trait Opt: Debug {
Show 39 methods
// Required methods
fn reset(&mut self);
fn uid(&self) -> Uid;
fn name(&self) -> &str;
fn type(&self) -> &TypeId;
fn hint(&self) -> &str;
fn help(&self) -> &str;
fn valid(&self) -> bool;
fn matched(&self) -> bool;
fn force(&self) -> bool;
fn action(&self) -> &Action;
fn index(&self) -> Option<&Index>;
fn alias(&self) -> Option<&Vec<String>>;
fn accessor(&self) -> &ValAccessor;
fn accessor_mut(&mut self) -> &mut ValAccessor;
fn ignore_alias(&self) -> bool;
fn ignore_name(&self) -> bool;
fn ignore_index(&self) -> bool;
fn set_uid(&mut self, uid: Uid);
fn set_matched(&mut self, matched: bool);
fn mat_style(&self, style: Style) -> bool;
fn mat_force(&self, force: bool) -> bool;
fn mat_name(&self, name: Option<&str>) -> bool;
fn mat_alias(&self, name: &str) -> bool;
fn mat_index(&self, index: Option<(usize, usize)>) -> bool;
fn init(&mut self) -> Result<(), Error>;
fn set_name(&mut self, name: impl Into<String>) -> &mut Self;
fn set_type(&mut self, type: TypeId) -> &mut Self;
fn set_value(&mut self, value: ValAccessor) -> &mut Self;
fn set_hint(&mut self, hint: impl Into<String>) -> &mut Self;
fn set_help(&mut self, help: impl Into<String>) -> &mut Self;
fn set_action(&mut self, action: Action) -> &mut Self;
fn set_style(&mut self, styles: Vec<Style>) -> &mut Self;
fn set_index(&mut self, index: Option<Index>) -> &mut Self;
fn set_force(&mut self, force: bool) -> &mut Self;
fn add_alias(&mut self, name: impl Into<String>) -> &mut Self;
fn rem_alias(&mut self, name: &str) -> &mut Self;
fn set_ignore_name(&mut self, ignore_name: bool) -> &mut Self;
fn set_ignore_alias(&mut self, ignore_alias: bool) -> &mut Self;
fn set_ignore_index(&mut self, ignore_index: bool) -> &mut Self;
}Required Methods§
fn reset(&mut self)
fn valid(&self) -> bool
fn accessor(&self) -> &ValAccessor
fn accessor_mut(&mut self) -> &mut ValAccessor
fn ignore_alias(&self) -> bool
fn ignore_name(&self) -> bool
fn ignore_index(&self) -> bool
fn set_uid(&mut self, uid: Uid)
fn set_matched(&mut self, matched: bool)
fn mat_style(&self, style: Style) -> bool
fn mat_force(&self, force: bool) -> bool
fn mat_name(&self, name: Option<&str>) -> bool
fn mat_alias(&self, name: &str) -> bool
fn mat_index(&self, index: Option<(usize, usize)>) -> bool
fn init(&mut self) -> Result<(), Error>
fn set_name(&mut self, name: impl Into<String>) -> &mut Self
fn set_type(&mut self, type: TypeId) -> &mut Self
fn set_value(&mut self, value: ValAccessor) -> &mut Self
fn set_hint(&mut self, hint: impl Into<String>) -> &mut Self
fn set_help(&mut self, help: impl Into<String>) -> &mut Self
fn set_action(&mut self, action: Action) -> &mut Self
fn set_style(&mut self, styles: Vec<Style>) -> &mut Self
fn set_index(&mut self, index: Option<Index>) -> &mut Self
fn set_force(&mut self, force: bool) -> &mut Self
fn add_alias(&mut self, name: impl Into<String>) -> &mut Self
fn rem_alias(&mut self, name: &str) -> &mut Self
fn set_ignore_name(&mut self, ignore_name: bool) -> &mut Self
fn set_ignore_alias(&mut self, ignore_alias: bool) -> &mut Self
fn set_ignore_index(&mut self, ignore_index: bool) -> &mut Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.