pub trait Integer: Sealed + Copy + Default + 'static {
    const I8: i8;
    const I16: i16;
    const I32: i32;
    const I64: i64;
    const ISIZE: isize;

    // Required methods
    fn to_i8() -> i8;
    fn to_i16() -> i16;
    fn to_i32() -> i32;
    fn to_i64() -> i64;
    fn to_isize() -> isize;
}
Expand description

The marker trait for compile time signed integers.

Example

use typenum::{Integer, P3};

assert_eq!(P3::to_i32(), 3);
assert_eq!(P3::I32, 3);

Required Associated Constants§

Required Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Integer for Z0

source§

const I8: i8 = 0i8

source§

const I16: i16 = 0i16

source§

const I32: i32 = 0i32

source§

const I64: i64 = 0i64

source§

const ISIZE: isize = 0isize

source§

impl<U: Unsigned + NonZero> Integer for NInt<U>

source§

const I8: i8 = _

source§

const I16: i16 = _

source§

const I32: i32 = _

source§

const I64: i64 = _

source§

const ISIZE: isize = _

source§

impl<U: Unsigned + NonZero> Integer for PInt<U>

source§

const I8: i8 = U::I8

source§

const I16: i16 = U::I16

source§

const I32: i32 = U::I32

source§

const I64: i64 = U::I64

source§

const ISIZE: isize = U::ISIZE