pub trait PrimitiveDiscriminant:
Copy
+ SealedPrimitiveDiscriminant
+ Sized { }Expand description
Denotes a primitive, integral discriminant type.
This type is specifically defined as a type which may be used as a representation in the repr attribute, i.e. u8, i8, u16, i16, u32, i32, u64, i64, usize, and isize.
On nightly, this additionally includes u128 and i128 (see repr128).
Note that this trait is implemented for these two types regardless.
Internally – specifically in the GenericDecodeError enumeration – this trait guarantees representability in the u128 type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.