Trait core::convert::From
[−]
[src]
pub trait From<T> {
fn from(T) -> Self;
}Construct Self`Self` via a conversion.
Examples
String`Stringimplements` implements From<&str>`From<&str>`:
let string = "hello".to_string(); let other_string = String::from("hello"); assert_eq!(string, other_string);
Required Methods
fn from(T) -> Self
Performs the conversion.
Implementors
impl<T> From<T> for T