[][src]Trait rustils::parse::ubyte::ToU8

pub trait ToU8 {
    fn to_u8_res(self) -> ParseResultU8;
fn to_u8(self) -> u8; }

Required methods

fn to_u8_res(self) -> ParseResultU8

fn to_u8(self) -> u8

Loading content...

Implementations on Foreign Types

impl ToU8 for bool[src]

fn to_u8_res(self) -> ParseResultU8[src]

Parse bool to u8 (see more: bool_to_u8_res)

Examples

use rustils::parse::ubyte::ToU8;

assert_eq!(true.to_u8_res(), Ok(1_u8));
assert_eq!(false.to_u8_res(), Ok(0_u8));

fn to_u8(self) -> u8[src]

Parse bool to u8 (see more: bool_to_u8)

Examples

use rustils::parse::ubyte::ToU8;

assert_eq!(true.to_u8(), 1_u8);
assert_eq!(false.to_u8(), 0_u8);

impl ToU8 for i8[src]

impl ToU8 for i16[src]

impl ToU8 for u16[src]

impl ToU8 for i32[src]

impl ToU8 for u32[src]

impl ToU8 for f32[src]

impl ToU8 for i64[src]

impl ToU8 for u64[src]

impl ToU8 for f64[src]

impl ToU8 for isize[src]

impl ToU8 for usize[src]

impl ToU8 for String[src]

impl ToU8 for &'static str[src]

Loading content...

Implementors

Loading content...