[][src]Trait rustils::parse::uint::ToU32

pub trait ToU32 {
    fn to_u32_res(self) -> ParseResultU32;
fn to_u32(self) -> u32; }

Required methods

fn to_u32_res(self) -> ParseResultU32

fn to_u32(self) -> u32

Loading content...

Implementations on Foreign Types

impl ToU32 for bool[src]

fn to_u32_res(self) -> ParseResultU32[src]

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));

fn to_u32(self) -> u32[src]

Parse bool to u32 (see more: bool_to_u32)

Examples

use rustils::parse::uint::ToU32;

assert_eq!(true.to_u32(), 1_u32);
assert_eq!(false.to_u32(), 0_u32);

impl ToU32 for i8[src]

impl ToU32 for i16[src]

impl ToU32 for i32[src]

impl ToU32 for f32[src]

impl ToU32 for i64[src]

impl ToU32 for u64[src]

impl ToU32 for f64[src]

impl ToU32 for isize[src]

impl ToU32 for usize[src]

impl ToU32 for String[src]

impl ToU32 for &'static str[src]

Loading content...

Implementors

Loading content...