I can't figure out how to get a float into an unsigned integer. There doesn't seem to be anything like TryFrom for this conversion and simply coercing to the target type produces produces invalid results. e. g.
let f = -1234.456f64;
f.trunc() as u64 // produces `0` when what I need in this case is an Err