rust/src/libcore/from_str.rs

13 lines
246 B
Rust
Raw Normal View History

//! The trait for types that can be created from strings
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
2012-09-03 17:59:37 -05:00
use option::Option;
pub trait FromStr {
2012-09-03 16:14:17 -05:00
static fn from_str(s: &str) -> Option<self>;
}
2012-09-03 17:59:37 -05:00