Trait cipher::Unsigned

source ·
pub trait Unsigned: Sealed + Copy + Default + 'static {
    const U8: u8;
    const U16: u16;
    const U32: u32;
    const U64: u64;
    const USIZE: usize;
    const I8: i8;
    const I16: i16;
    const I32: i32;
    const I64: i64;
    const ISIZE: isize;

    // Required methods
    fn to_u8() -> u8;
    fn to_u16() -> u16;
    fn to_u32() -> u32;
    fn to_u64() -> u64;
    fn to_usize() -> usize;
    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 unsigned integers.

§Example

use typenum::{Unsigned, U3};

assert_eq!(U3::to_u32(), 3);
assert_eq!(U3::I32, 3);

Required Associated Constants§

Required Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Unsigned for UTerm

source§

const U8: u8 = 0u8

source§

const U16: u16 = 0u16

source§

const U32: u32 = 0u32

source§

const U64: u64 = 0u64

source§

const USIZE: usize = 0usize

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, B> Unsigned for UInt<U, B>
where U: Unsigned, B: Bit,

source§

const U8: u8 = _

source§

const U16: u16 = _

source§

const U32: u32 = _

source§

const U64: u64 = _

source§

const USIZE: usize = _

source§

const I8: i8 = _

source§

const I16: i16 = _

source§

const I32: i32 = _

source§

const I64: i64 = _

source§

const ISIZE: isize = _