-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parse a unit type from a string #391
Comments
Quantity implements use uom::si::f32::Mass;
let l = "1 km".parse::<Mass>().unwrap(); |
Right, i was looking to use the unit types only, not directly a quantity. I was thinking of just separating the value and the unit in a struct. |
Yes, |
Thanks again ! |
Is there a way to parse a unit type from a string ?
I need to send some values with their unit types to databases, so I was thinking of converting the unit type to a string to store it. I don't see any way of deserializing it from a string though, did I miss something ?
The text was updated successfully, but these errors were encountered: