[−]Function lumol::units::from_str
pub fn from_str(value: &str) -> Result<f64, ParseError>
Parse the string val
and convert it to the corresponding internal unit
use lumol_core::units; let internal = units::from_str("10 A").unwrap(); assert!(internal == 10.0);