Skip to main content

ToI16

Trait ToI16 

Source
pub trait ToI16 {
    // Required method
    fn to_i16(&self) -> i16;
}
Expand description

Trait defining instance method to_i16() : i16 that provides a no-cost or low-cost conversion into i16.

It is expected that the implementing type “is-a” i16 in a logical manner.

§Additional Implementations on Foreign Types

§Built-in Types

If the feature "implement-ToI16-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_i16(&self) -> i16

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToI16 for i8

Source§

fn to_i16(&self) -> i16

Source§

impl ToI16 for i16

Source§

fn to_i16(&self) -> i16

Source§

impl ToI16 for u8

Source§

fn to_i16(&self) -> i16

Source§

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

Available on non-crate feature nostd only.
Source§

fn to_i16(&self) -> i16

Source§

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

Available on non-crate feature nostd only.
Source§

fn to_i16(&self) -> i16

Implementors§