Trait mg_settings::EnumFromStr
[−]
[src]
pub trait EnumFromStr where
Self: Sized, { fn create(variant: &str, argument: &str) -> Result<Self, String>; fn has_argument(variant: &str) -> Result<bool, String>; }
The EnumFromStr
trait is used to specify how to construct an enum value from a string.
Required Methods
fn create(variant: &str, argument: &str) -> Result<Self, String>
Create the enum value from the variant
string and an argument
string.
fn has_argument(variant: &str) -> Result<bool, String>
Check wether the enum variant has an argument.