pub trait ToU16: CastInto<Self::Output> {
type Output;
// Required methods
fn to_u16(self) -> Self::Output;
fn to_u16_range(self) -> Self::Output;
}Expand description
Helper trait based on CastInto and CastRangeInto
Also work on composite like std::array, [Vector]…
Required Associated Types§
Required Methods§
Sourcefn to_u16_range(self) -> Self::Output
fn to_u16_range(self) -> Self::Output
Remap the value RangeDefault to the RangeDefault of the target type,
in a generic friendly way, and similar to the From trait.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".