Trait cstr_enum::FromCStr [−][src]
Conversion from a C-style string
This trait should be used the same way as std::str::FromStr
, although
a separate .parse()
implementation is not provided &str
Associated Types
type Err: Sized
[src]
The error type returned if parsing fails.
If using the derive macro, this will be &'static str
.
Required methods
fn from_cstr(s: &CStr) -> Result<Self, Self::Err> where
Self: Sized,
[src]
Self: Sized,
Parse the &CStr
for an instance of Self
.
If using the derive macro, this will be a match
statement over &'static [u8]
.