pub trait RangePattern {
const MIN: Self;
const MAX: Self;
// Required method
const fn sub_one(self) -> Self;
}
🔬This is a nightly-only experimental API. (
pattern_type_range_trait
)Expand description
A trait implemented for integer types and char
.
Useful in the future for generic pattern types, but
used right now to simplify ast lowering of pattern type ranges.
Required Associated Constants§
Required Methods§
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.