pub trait RangeCheck: RangeBounds<usize> + Debug {
// Required method
fn is_valid(&self, len: usize) -> bool;
}Expand description
A range that can check whether it is within the bounds of a slice.
This traits makes it possible to monomorphize the six different
range checks that are necessary to handle the six type of
ranges available in core::ops.
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.