pub struct Interval(/* private fields */);
Expand description
Struct Interval
containing two values representing the limit of the interval.
The Interval
is incluse which means that Interval(0, 10)
is [0, 10].
The value 0 is supposed to be equals or greater than the second value.
Implementations§
Source§impl Interval
impl Interval
pub fn new(begin: u32, end: u32) -> Interval
Sourcepub fn range_size(&self) -> u32
pub fn range_size(&self) -> u32
Because the trait Order is needed to sort the IntervalSet I dont what to change the
native order. This function coud be considered as the len
of the interval.
Sourcepub fn get_inf(&self) -> u32
pub fn get_inf(&self) -> u32
I am not sure about those two function, maybe set the field as public could be a better idea…
pub fn get_sup(&self) -> u32
Trait Implementations§
Source§impl Ord for Interval
impl Ord for Interval
Source§impl PartialOrd for Interval
impl PartialOrd for Interval
Source§impl ToIntervalSet for Interval
impl ToIntervalSet for Interval
Source§fn to_interval_set(self) -> IntervalSet
fn to_interval_set(self) -> IntervalSet
Convert a simple interval into an intervalset. Note that the validity of the interval is checked.
impl Eq for Interval
impl StructuralPartialEq for Interval
Auto Trait Implementations§
impl Freeze for Interval
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnwindSafe for Interval
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more