pub trait FromStr: Sized {
type Error: Error + Send + Sync + 'static;
// Required method
fn from_str(s: &str) -> Result<Self, Self::Error>;
}
Expand description
Defines the way to parse the object from a UTF-8 string.
This is like the standard FromStr
trait, except that it imposes
additional bounds on the error type to make it more usable for
aggregation to higher level errors and passing between threads.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.