pub trait FromStr { fn from_str(s: &str) -> Option<Self>; }
A trait to abstract the idea of creating a new instance of a type from a string.
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.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).