MCPcopy Create free account
hub / github.com/davidblewett/rure-python / new

Method new

regex/regex-syntax/src/hir/interval.rs:43–47  ·  view source on GitHub ↗

Create a new set from a sequence of intervals. Each interval is specified as a pair of bounds, where both bounds are inclusive. The given ranges do not need to be in any specific order, and ranges may overlap.

(intervals: T)

Source from the content-addressed store, hash-verified

41 /// The given ranges do not need to be in any specific order, and ranges
42 /// may overlap.
43 pub fn new<T: IntoIterator<Item=I>>(intervals: T) -> IntervalSet<I> {
44 let mut set = IntervalSet { ranges: intervals.into_iter().collect() };
45 set.canonicalize();
46 set
47 }
48
49 /// Add a new interval to this set.
50 pub fn push(&mut self, interval: I) {

Callers

nothing calls this directly

Calls 2

into_iterMethod · 0.45
canonicalizeMethod · 0.45

Tested by

no test coverage detected