Skip to main content

Integer

Trait Integer 

Source
pub trait Integer:
    PrimInt
    + TryFrom<usize>
    + Default
    + Debug
    + ToPrimitive
    + 'static {
    // Required methods
    fn to_usize(self) -> usize;
    fn from_usize(v: usize) -> Self;
}
Expand description

Trait for types valid as integer elements in columnar arrays.

Required Methods§

Source

fn to_usize(self) -> usize

Lossless cast to usize

Source

fn from_usize(v: usize) -> Self

Lossless cast from usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Integer for i8

Source§

impl Integer for i16

Source§

impl Integer for i32

Source§

impl Integer for i64

Source§

impl Integer for u8

Source§

impl Integer for u16

Source§

impl Integer for u32

Source§

impl Integer for u64

Implementors§