pub trait ToI64 {
// Required methods
fn to_i64_res(self) -> ParseResultI64;
fn to_i64(self) -> i64;
}Required Methods§
fn to_i64_res(self) -> ParseResultI64
fn to_i64(self) -> i64
Implementations on Foreign Types§
Source§impl ToI64 for &'static str
impl ToI64 for &'static str
fn to_i64_res(self) -> ParseResultI64
fn to_i64(self) -> i64
Source§impl ToI64 for bool
impl ToI64 for bool
Source§fn to_i64_res(self) -> ParseResultI64
fn to_i64_res(self) -> ParseResultI64
Parse bool to
i64
(see more: bool_to_i64_res)
§Examples
use rustils::parse::long::ToI64;
assert_eq!(true.to_i64_res(), Ok(1_i64));
assert_eq!(false.to_i64_res(), Ok(0_i64));Source§impl ToI64 for u64
impl ToI64 for u64
Source§fn to_i64_res(self) -> ParseResultI64
fn to_i64_res(self) -> ParseResultI64
Parse u64 to
i64
(see more: u64_to_i64_res)
§Examples
use rustils::parse::long::ToI64;
assert_eq!(0_u64.to_i64_res(), Ok(0_i64));
assert_eq!(9223372036854775807_u64.to_i64_res(), Ok(9223372036854775807_i64));Source§impl ToI64 for usize
impl ToI64 for usize
Source§fn to_i64_res(self) -> ParseResultI64
fn to_i64_res(self) -> ParseResultI64
Parse usize to
i64
(see more: usize_to_i64_res)
§Examples
use rustils::parse::long::ToI64;
assert_eq!(0_usize.to_i64_res(), Ok(0_i64));
assert_eq!(9223372036854775807_usize.to_i64_res(), Ok(9223372036854775807_i64));