[−][src]Trait rustils::parse::short::ToI16
Required methods
fn to_i16_res(self) -> ParseResultI16
fn to_i16(self) -> i16
Implementations on Foreign Types
impl ToI16 for bool
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
Parse bool
to
i16
(see more: bool_to_i16_res
)
Examples
use rustils::parse::short::ToI16; assert_eq!(true.to_i16_res(), Ok(1_i16)); assert_eq!(false.to_i16_res(), Ok(0_i16));
fn to_i16(self) -> i16
[src]
Parse bool
to
i16
(see more: bool_to_i16
)
Examples
use rustils::parse::short::ToI16; assert_eq!(true.to_i16(), 1_i16); assert_eq!(false.to_i16(), 0_i16);
impl ToI16 for u16
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
Parse u16
to
i16
(see more: u16_to_i16_res
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_u16.to_i16_res(), Ok(0_i16)); assert_eq!(32767_u16.to_i16_res(), Ok(32767_i16));
fn to_i16(self) -> i16
[src]
Parse u16
to
i16
(see more: u16_to_i16
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_u16.to_i16(), 0_i16); assert_eq!(32767_u16.to_i16(), 32767_i16);
impl ToI16 for i32
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
fn to_i16(self) -> i16
[src]
impl ToI16 for u32
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
Parse u32
to
i16
(see more: u32_to_i16_res
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_u32.to_i16_res(), Ok(0_i16)); assert_eq!(32767_u32.to_i16_res(), Ok(32767_i16));
fn to_i16(self) -> i16
[src]
Parse u32
to
i16
(see more: u32_to_i16
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_u32.to_i16(), 0_i16); assert_eq!(32767_u32.to_i16(), 32767_i16);
impl ToI16 for f32
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
fn to_i16(self) -> i16
[src]
impl ToI16 for i64
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
fn to_i16(self) -> i16
[src]
impl ToI16 for u64
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
Parse u64
to
i16
(see more: u64_to_i16_res
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_u64.to_i16_res(), Ok(0_i16)); assert_eq!(32767_u64.to_i16_res(), Ok(32767_i16));
fn to_i16(self) -> i16
[src]
Parse u64
to
i16
(see more: u64_to_i16
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_u64.to_i16(), 0_i16); assert_eq!(32767_u64.to_i16(), 32767_i16);
impl ToI16 for f64
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
fn to_i16(self) -> i16
[src]
impl ToI16 for isize
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
fn to_i16(self) -> i16
[src]
impl ToI16 for usize
[src]
fn to_i16_res(self) -> ParseResultI16
[src]
Parse usize
to
i16
(see more: usize_to_i16_res
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_usize.to_i16_res(), Ok(0_i16)); assert_eq!(32767_usize.to_i16_res(), Ok(32767_i16));
fn to_i16(self) -> i16
[src]
Parse usize
to
i16
(see more: usize_to_i16
)
Examples
use rustils::parse::short::ToI16; assert_eq!(0_usize.to_i16(), 0_i16); assert_eq!(32767_usize.to_i16(), 32767_i16);