pub(crate) trait Ranged {
type BoundType: Ord + Copy;
// Required method
fn range(&self) -> (Self::BoundType, Self::BoundType);
// Provided method
fn overlap<T>(&self, other: &T) -> bool
where T: Ranged<BoundType = Self::BoundType> { ... }
}
Expand description
Trait for any items with specific range.
Required Associated Types§
Required Methods§
Provided 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.