pub trait ToF64 {
// Required methods
fn to_f64_res(self) -> ParseResultF64;
fn to_f64(self) -> f64;
}
Required Methods§
fn to_f64_res(self) -> ParseResultF64
fn to_f64(self) -> f64
Implementations on Foreign Types§
Source§impl ToF64 for &'static str
impl ToF64 for &'static str
fn to_f64_res(self) -> ParseResultF64
fn to_f64(self) -> f64
Source§impl ToF64 for bool
impl ToF64 for bool
Source§fn to_f64_res(self) -> ParseResultF64
fn to_f64_res(self) -> ParseResultF64
Parse bool
to
f64
(see more: bool_to_f64_res
)
§Examples
use rustils::parse::double::ToF64;
assert_eq!(true.to_f64_res(), Ok(1.0_f64));
assert_eq!(false.to_f64_res(), Ok(0.0_f64));