pub trait ChoiceOptions:
Copy
+ Eq
+ 'static {
const ALL: &'static [Self];
// Required methods
fn name(self) -> &'static str;
fn description(self) -> Option<Content>;
// Provided method
fn from_name(name: &str) -> Option<Self> { ... }
}Expand description
A fixed set of Choice options backed by a Rust type, usually a fieldless enum.
Implement it with choice_options! or by hand. The option
names are the strings sent to the API and returned in answers, and must be unique.
Required Associated Constants§
Required Methods§
Sourcefn description(self) -> Option<Content>
fn description(self) -> Option<Content>
When this option applies; None sends the name alone.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".