pub trait RangePattern {
const MIN: Self;
const MAX: Self;
// Required method
fn sub_one(self) -> Self;
}
๐ฌThis is a nightly-only experimental API. (
pattern_type_range_trait
#123646)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.