Trait ToPrimitive

Source
pub trait ToPrimitive: ToPrimitive {
    // Required method
    fn to_i256(&self) -> Option<i256>;
}
Expand description

Checked conversion from one primitive type to another.

This is meant to mirror the ToPrimitive trait from num-traits but with awareness of i256.

Required Methods§

Source

fn to_i256(&self) -> Option<i256>

Converts the value of self to an i256. If the value cannot be represented by an i256, then None is returned.

Implementations on Foreign Types§

Source§

impl ToPrimitive for i8

Source§

impl ToPrimitive for i16

Source§

impl ToPrimitive for i32

Source§

impl ToPrimitive for i64

Source§

impl ToPrimitive for i128

Source§

impl ToPrimitive for u8

Source§

impl ToPrimitive for u16

Source§

impl ToPrimitive for u32

Source§

impl ToPrimitive for u64

Source§

impl ToPrimitive for u128

Implementors§