The trait for types that can be created from strings

Trait FromStr

A trait to abstract the idea of creating a new instance of a type from a string.

Method from_str

fn from_str(s: &str) -> Option<Self>

Parses a string s to return an optional value of this type. If the string is ill-formatted, the None is returned.