pub trait ToU32 {
// Required methods
fn to_u32_res(self) -> ParseResultU32;
fn to_u32(self) -> u32;
}
Required Methods§
fn to_u32_res(self) -> ParseResultU32
fn to_u32(self) -> u32
Implementations on Foreign Types§
Source§impl ToU32 for &'static str
impl ToU32 for &'static str
fn to_u32_res(self) -> ParseResultU32
fn to_u32(self) -> u32
Source§impl ToU32 for bool
impl ToU32 for bool
Source§fn to_u32_res(self) -> ParseResultU32
fn to_u32_res(self) -> ParseResultU32
Parse bool
to
u32
(see more: bool_to_u32_res
)
§Examples
use rustils::parse::uint::ToU32;
assert_eq!(true.to_u32_res(), Ok(1_u32));
assert_eq!(false.to_u32_res(), Ok(0_u32));