[][src]Trait rustils::parse::boolean::ToBool

pub trait ToBool {
    fn to_bool(self) -> bool;
}

Required methods

fn to_bool(self) -> bool

Loading content...

Implementations on Foreign Types

impl ToBool for i8[src]

fn to_bool(self) -> bool[src]

Parse i8 to bool (see more: i8_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_i8.to_bool());
assert!(1_i8.to_bool());

impl ToBool for u8[src]

fn to_bool(self) -> bool[src]

Parse u8 to bool (see more: u8_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_u8.to_bool());
assert!(1_u8.to_bool());

impl ToBool for i16[src]

fn to_bool(self) -> bool[src]

Parse i16 to bool (see more: i16_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_i16.to_bool());
assert!(1_i16.to_bool());

impl ToBool for u16[src]

fn to_bool(self) -> bool[src]

Parse u16 to bool (see more: u16_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_u16.to_bool());
assert!(1_u16.to_bool());

impl ToBool for i32[src]

fn to_bool(self) -> bool[src]

Parse i32 to bool (see more: i32_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_i32.to_bool());
assert!(1_i32.to_bool());

impl ToBool for u32[src]

fn to_bool(self) -> bool[src]

Parse u32 to bool (see more: u32_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_u32.to_bool());
assert!(1_u32.to_bool());

impl ToBool for f32[src]

fn to_bool(self) -> bool[src]

Parse f32 to bool (see more: f32_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0.0_f32.to_bool());
assert!(1.0_f32.to_bool());

impl ToBool for i64[src]

fn to_bool(self) -> bool[src]

Parse i64 to bool (see more: i64_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_i64.to_bool());
assert!(1_i64.to_bool());

impl ToBool for u64[src]

fn to_bool(self) -> bool[src]

Parse u64 to bool (see more: u64_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_u64.to_bool());
assert!(1_u64.to_bool());

impl ToBool for f64[src]

fn to_bool(self) -> bool[src]

Parse f64 to bool (see more: f64_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0.0_f64.to_bool());
assert!(1.0_f64.to_bool());

impl ToBool for isize[src]

fn to_bool(self) -> bool[src]

Parse isize to bool (see more: isize_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_isize.to_bool());
assert!(1_isize.to_bool());

impl ToBool for usize[src]

fn to_bool(self) -> bool[src]

Parse usize to bool (see more: usize_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!0_usize.to_bool());
assert!(1_usize.to_bool());

impl ToBool for String[src]

fn to_bool(self) -> bool[src]

Parse String to bool (see more: string_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!String::from("0").to_bool());
assert!(String::from("1").to_bool());

impl ToBool for &'static str[src]

fn to_bool(self) -> bool[src]

Parse &str to bool (see more: str_to_bool)

Examples

use rustils::parse::boolean::ToBool;

assert!(!"0".to_bool());
assert!("1".to_bool());
Loading content...

Implementors

Loading content...