pub trait DeepCount {
const DEEP_COUNT: usize;
}Expand description
Convenience companion trait that exposes the length of
DeepVariants::DEEP_VARIANTS without dereferencing the slice.
This is a blanket impl over every T: DeepVariants, so callers can write
Foo::DEEP_COUNT for any type that implements DeepVariants. There is
nothing to derive or implement manually.
Required Associated Constants§
Sourceconst DEEP_COUNT: usize
const DEEP_COUNT: usize
The number of values in DeepVariants::DEEP_VARIANTS.
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.