Struct rangemap::RangeSet[][src]

pub struct RangeSet<T> { /* fields omitted */ }
Expand description

A set whose items are stored as (half-open) ranges bounded inclusively below and exclusively above (start..end).

See RangeMap’s documentation for more details.

Implementations

Makes a new empty RangeSet.

Returns a reference to the range covering the given key, if any.

Returns true if any range in the set covers the specified value.

Gets an ordered iterator over all ranges, ordered by range.

Insert a range into the set.

If the inserted range either overlaps or is immediately adjacent any existing range, then the ranges will be coalesced into a single contiguous range.

Panics

Panics if range start >= end.

Removes a range from the set, if all or any of it was present.

If the range to be removed partially overlaps any ranges in the set, then those ranges will be contracted to no longer cover the removed range.

Panics

Panics if range start >= end.

Gets an iterator over all the maximally-sized ranges contained in outer_range that are not covered by any range stored in the set.

The iterator element type is Range<T>.

NOTE: Calling gaps eagerly finds the first gap, even if the iterator is never consumed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Creates a value from an iterator. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.