pub trait Interval<T>: Set<T>{
// Required methods
fn from_boundaries(start: T, end_inclusive: T) -> Self;
fn get_start(&self) -> T;
fn get_end(&self) -> T;
fn length(&self) -> T;
// Provided methods
fn get_start_if_nonempty(&self) -> Option<T> { ... }
fn get_end_if_nonempty(&self) -> Option<T> { ... }
}
Expand description
A one-dimensional interval with a start and an end. Whether or not the start and end elements are included in the interval depends on the actual implementor type
Required Methods§
fn from_boundaries(start: T, end_inclusive: T) -> Self
fn get_start(&self) -> T
fn get_end(&self) -> T
fn length(&self) -> T
Provided Methods§
fn get_start_if_nonempty(&self) -> Option<T>
fn get_end_if_nonempty(&self) -> Option<T>
Object Safety§
This trait is not object safe.