Trait ConvertInto

Source
pub trait ConvertInto<T> {
    // Required method
    fn convert_into(self) -> T;
}
Expand description

Consuming Sample conversion trait

Required Methods§

Source

fn convert_into(self) -> T

Convert to correct format

Implementations on Foreign Types§

Source§

impl ConvertInto<f32> for i32

Source§

fn convert_into(self) -> f32

Convertion to float, so that i32::MAX => 1.0 and i32::MIN => -1.0

Source§

impl ConvertInto<i32> for f32

Source§

fn convert_into(self) -> i32

Convertion from float, so that 1.0 => i32::MAX and -1.0 => i32::MIN

Implementors§

Source§

impl<T> ConvertInto<T> for T

Auto implementation making self->self conversion a nop