1
Fork 0

docs: Update FromStr documentation

Fixes #25250
This commit is contained in:
Ulrik Sverdrup 2015-05-11 00:22:04 +02:00
parent 9ecc9896de
commit 4e8afd65f9

View file

@ -44,8 +44,11 @@ pub trait FromStr {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
type Err; type Err;
/// Parses a string `s` to return an optional value of this type. If the /// Parses a string `s` to return a value of this type.
/// string is ill-formatted, the None is returned. ///
/// If parsing succeeds, return the value inside `Ok`, otherwise
/// when the string is ill-formatted return an error specific to the
/// inside `Err`. The error type is specific to implementation of the trait.
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
fn from_str(s: &str) -> Result<Self, Self::Err>; fn from_str(s: &str) -> Result<Self, Self::Err>;
} }