pub trait ToU16 {
// Required method
fn to_u16(&self) -> u16;
}Expand description
Trait defining instance method to_u16() : u16 that provides a
no-cost or low-cost conversion into u16.
It is expected that the implementing type “is-a” u16 in a logical
manner.
§Additional Implementations on Foreign Types
§Built-in Types
If the feature "implement-ToU16-for-built_ins"
is defined (as it is by "default"), then this is also implemented
for the following type(s):