Traits related to integers. 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.
| 6 | /// Implementing this trait on non-primitive-integer types breaks assumptions of other unsafe code, |
| 7 | /// and should not be done. |
| 8 | pub unsafe trait Integer: num_traits::PrimInt + crate::scalar::Scalar { |
| 9 | /// Width of the integer, in bits. |
| 10 | const WIDTH: usize; |
| 11 | /// If the integer is signed: true means signed, false means unsigned. |
| 12 | const SIGNED: bool; |
| 13 | } |
| 14 | |
| 15 | /// A trait for being generic over signed integer types. |
| 16 | pub trait SignedInteger: Integer {} |
no outgoing calls
no test coverage detected