/// Parses a string into a `SystemMode` variant.
///
/// To successfully parse, the string must be a lower snake case representation of the `SystemMode`
/// variant.
Parses a string into a `SystemMode` variant.
To successfully parse, the string must be a lower snake case representation of the `SystemMode`
variant.
Parses a string into a ` SystemMode ` variant . To successfully parse the string must be a lower snake case representation of the ` SystemMode ` variant .
fn str_to_system_mode(s: &str) -> Result<SystemMode, Error> {
    // Since `SystemMode` doesn't actually contain any variants today, we bail unconditionally here.
    // Once `SystemMode` grows one or more variants then we should string match to return the
    // correct one (same as in `str_to_client_type`).
    bail!("Unsupported system mode '{}'", s)
}
fn str_to_system_mode ( s : & str ) -> Result < SystemMode , Error > { // Since `SystemMode` doesn't actually contain any variants today, we bail unconditionally here. // Once `SystemMode` grows one or more variants then we should string match to return the // correct one (same as in `str_to_client_type`). bail ! ( " " s ) }
Parses a string into a `SystemMode` variant.
Parses a string into a ` SystemMode ` variant .
s
&str