Skip to main content

PrimitiveUnsigned

Trait PrimitiveUnsigned 

Source
pub trait PrimitiveUnsigned:
    Sealed
    + PrimitiveInteger
    + PrimitiveUnsigned<Signed = Self::Signed> {
    type Signed: PrimitiveSigned;
}
Expand description

A trait for all primitive unsigned integer types.

Implemented for u8, u16, u32, u64, u128 and usize.

This trait can be used in generic contexts to access unsigned-integer-specific functionality for vectors, matrices, etc. This trait does not expose any functions directly.

Currently many integer functions cannot be used in generic contexts because their names conflict with floating-point functions. When the type system allows this, all functions will be available.

Required Associated Types§

Source

type Signed: PrimitiveSigned

The signed integer type with equal width.

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 PrimitiveUnsigned for u8

Source§

impl PrimitiveUnsigned for u16

Source§

impl PrimitiveUnsigned for u32

Source§

impl PrimitiveUnsigned for u64

Source§

impl PrimitiveUnsigned for u128

Source§

impl PrimitiveUnsigned for usize

Implementors§