[][src]Trait rustils::parse::float::ToF32

pub trait ToF32 {
    fn to_f32_res(self) -> ParseResultF32;
fn to_f32(self) -> f32; }

Required methods

fn to_f32_res(self) -> ParseResultF32

fn to_f32(self) -> f32

Loading content...

Implementations on Foreign Types

impl ToF32 for bool[src]

fn to_f32_res(self) -> ParseResultF32[src]

Parse bool to f32 (see more: bool_to_f32_res)

Examples

use rustils::parse::float::ToF32;

assert_eq!(true.to_f32_res(), Ok(1.0_f32));
assert_eq!(false.to_f32_res(), Ok(0.0_f32));

fn to_f32(self) -> f32[src]

Parse bool to f32 (see more: bool_to_f32)

Examples

use rustils::parse::float::ToF32;

assert_eq!(true.to_f32(), 1.0_f32);
assert_eq!(false.to_f32(), 0.0_f32);

impl ToF32 for String[src]

impl ToF32 for &'static str[src]

Loading content...

Implementors

Loading content...