Trait ToU64

Source
pub trait ToU64 {
    // Required methods
    fn to_u64_res(self) -> ParseResultU64;
    fn to_u64(self) -> u64;
}

Required Methods§

Implementations on Foreign Types§

Source§

impl ToU64 for &'static str

Source§

impl ToU64 for bool

Source§

fn to_u64_res(self) -> ParseResultU64

Parse bool to u64 (see more: bool_to_u64_res)

§Examples
use rustils::parse::ulong::ToU64;

assert_eq!(true.to_u64_res(), Ok(1_u64));
assert_eq!(false.to_u64_res(), Ok(0_u64));
Source§

fn to_u64(self) -> u64

Parse bool to u64 (see more: bool_to_u64)

§Examples
use rustils::parse::ulong::ToU64;

assert_eq!(true.to_u64(), 1_u64);
assert_eq!(false.to_u64(), 0_u64);
Source§

impl ToU64 for f32

Source§

impl ToU64 for f64

Source§

impl ToU64 for i8

Source§

impl ToU64 for i16

Source§

impl ToU64 for i32

Source§

impl ToU64 for i64

Source§

impl ToU64 for isize

Source§

impl ToU64 for String

Implementors§