Struct interval_set::interval_set::Interval [] [src]

pub struct Interval(_, _);

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.

Methods

impl Interval
[src]

[src]

[src]

Return the maximum interval possible (with u32 var)

[src]

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.

[src]

Simply return an equivalent interval as tuple.

[src]

I am not sure about those two function, maybe set the field as public could be a better idea...

[src]

[src]

Utility function check if the interval is valid.

Examples

The following intervals are valids:

use interval_set::Interval;
Interval::new(0, 0);
Interval::new(10, 100);

The following intervals ae not valid:

use interval_set::Interval;
Interval::new(10, 0);

Trait Implementations

impl Clone for Interval
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Interval
[src]

[src]

Formats the value using the given formatter.

impl Eq for Interval
[src]

impl PartialEq for Interval
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl PartialOrd for Interval
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Interval
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl ToIntervalSet for Interval
[src]

[src]

Convert a simple interval into an intervalset. Note that the validity of the interval is checked.

impl Display for Interval
[src]

[src]

Formats the value using the given formatter. Read more