Lines Matching refs:from
40 fn from(setting: bool) -> Self { in from() method
46 fn from(setting: i64) -> Self { in from() method
52 fn from(setting: f64) -> Self { in from() method
58 fn from(setting: String) -> Self { in from() method
64 fn from(setting: &'a str) -> Self { in from() method
75 mod from { module
80 let actual = Subject::from(true); in bool()
88 let actual = Subject::from(42); in integer()
96 let actual = Subject::from(4.2); in float()
104 let actual = Subject::from("string".to_owned()); in string()
113 assert_eq!(Subject::from(true).to_string(), "true"); in to_string()
114 assert_eq!(Subject::from(42).to_string(), "42"); in to_string()
115 assert_eq!(Subject::from(4.2).to_string(), "4.2"); in to_string()
116 assert_eq!(Subject::from("string".to_owned()).to_string(), "\"string\""); in to_string()