pub trait FixedNumber: Copy {
type Type;
// Required methods
fn to_fixed(self) -> Self::Type;
fn from_fixed(_: Self::Type) -> Self;
}
Expand description
A FixedNumber
can be converted to a u32 or u64 type for use with fixed64
and fixed32 fields.
Required Associated Types§
Required Methods§
Sourcefn from_fixed(_: Self::Type) -> Self
fn from_fixed(_: Self::Type) -> Self
Converts from the fixed type.
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.