pub trait ToU64 {
// Required methods
fn to_u64_res(self) -> ParseResultU64;
fn to_u64(self) -> u64;
}
Required Methods§
fn to_u64_res(self) -> ParseResultU64
fn to_u64(self) -> u64
Implementations on Foreign Types§
Source§impl ToU64 for &'static str
impl ToU64 for &'static str
fn to_u64_res(self) -> ParseResultU64
fn to_u64(self) -> u64
Source§impl ToU64 for bool
impl ToU64 for bool
Source§fn to_u64_res(self) -> ParseResultU64
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));