ToU16

Trait ToU16 

Source
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):

Required Methods§

Source

fn to_u16(&self) -> u16

Implementations on Foreign Types§

Source§

impl ToU16 for u8

Source§

fn to_u16(&self) -> u16

Source§

impl ToU16 for u16

Source§

fn to_u16(&self) -> u16

Source§

impl<T: ToU16 + ?Sized> ToU16 for Box<T>

Available on non-crate feature nostd only.
Source§

fn to_u16(&self) -> u16

Source§

impl<T: ToU16 + ?Sized> ToU16 for Rc<T>

Available on non-crate feature nostd only.
Source§

fn to_u16(&self) -> u16

Implementors§