pub trait FromNumber: Copy {
// Required methods
fn from_i64(v: i64) -> Result<Self>;
fn from_u64(v: u64) -> Result<Self>;
}
Expand description
A trait for converting a value to from u64 for use in varint encodings.
N.B. The protobuf behavior is to truncate integers rather than fail on overflow.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.