[][src]Trait rustils::parse::ushort::ToU16

pub trait ToU16 {
    fn to_u16_res(self) -> ParseResultU16;
fn to_u16(self) -> u16; }

Required methods

fn to_u16_res(self) -> ParseResultU16

fn to_u16(self) -> u16

Loading content...

Implementations on Foreign Types

impl ToU16 for bool[src]

fn to_u16_res(self) -> ParseResultU16[src]

Parse bool to u16 (see more: bool_to_u16_res)

Examples

use rustils::parse::ushort::ToU16;

assert_eq!(true.to_u16_res(), Ok(1_u16));
assert_eq!(false.to_u16_res(), Ok(0_u16));

fn to_u16(self) -> u16[src]

Parse bool to u16 (see more: bool_to_u16)

Examples

use rustils::parse::ushort::ToU16;

assert_eq!(true.to_u16(), 1_u16);
assert_eq!(false.to_u16(), 0_u16);

impl ToU16 for i8[src]

impl ToU16 for i16[src]

impl ToU16 for i32[src]

impl ToU16 for u32[src]

impl ToU16 for f32[src]

impl ToU16 for i64[src]

impl ToU16 for u64[src]

impl ToU16 for f64[src]

impl ToU16 for isize[src]

impl ToU16 for usize[src]

impl ToU16 for String[src]

impl ToU16 for &'static str[src]

Loading content...

Implementors

Loading content...