pub unsafe trait Integer: PrimInt + Scalar {
    const WIDTH: usize;
    const SIGNED: bool;
}
Expand description

Abstract trait representing any SPIR-V integer type.

Safety

Implementing this trait on non-primitive-integer types breaks assumptions of other unsafe code, and should not be done.

Required Associated Constants§

source

const WIDTH: usize

Width of the integer, in bits.

source

const SIGNED: bool

If the integer is signed: true means signed, false means unsigned.

Implementations on Foreign Types§

source§

impl Integer for i32

source§

const WIDTH: usize = 32usize

source§

const SIGNED: bool = true

source§

impl Integer for i8

source§

const WIDTH: usize = 8usize

source§

const SIGNED: bool = true

source§

impl Integer for u16

source§

const WIDTH: usize = 16usize

source§

const SIGNED: bool = false

source§

impl Integer for u8

source§

const WIDTH: usize = 8usize

source§

const SIGNED: bool = false

source§

impl Integer for i16

source§

const WIDTH: usize = 16usize

source§

const SIGNED: bool = true

source§

impl Integer for i64

source§

const WIDTH: usize = 64usize

source§

const SIGNED: bool = true

source§

impl Integer for u32

source§

const WIDTH: usize = 32usize

source§

const SIGNED: bool = false

source§

impl Integer for u64

source§

const WIDTH: usize = 64usize

source§

const SIGNED: bool = false

Implementors§