Ranged

Trait Ranged 

Source
pub 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 (both boundaries are inclusive).

Required Associated Types§

Required Methods§

Source

fn range(&self) -> (Self::BoundType, Self::BoundType)

Returns the inclusive range of item.

Provided Methods§

Source

fn overlap<T>(&self, other: &T) -> bool
where T: Ranged<BoundType = Self::BoundType>,

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.

Implementors§

Source§

impl Ranged for FileGroup

Source§

type BoundType = Timestamp