pub trait PrimitiveIntRandomBounds: HasRandomPrimitiveInts { }Expand description
The bounds that PrimitiveInt has only when the random feature is enabled.
With the feature on this is [HasRandomPrimitiveInts]; with it off it is empty. Every type
meeting the bounds implements it automatically, so it never needs to be implemented by hand.
It exists because #[cfg] cannot be attached to an individual supertrait bound: without it,
making one bound conditional would mean writing all ~450 bounds of PrimitiveInt twice, once
per feature configuration, where a bound added to only one copy makes the two configurations
disagree silently.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T: HasRandomPrimitiveInts> PrimitiveIntRandomBounds for T
Available on crate feature
random only.