pubgrub/version_ranges
Types
pub type Bound(a) {
Unbounded
Included(a)
Excluded(a)
}
Constructors
-
Unbounded -
Included(a) -
Excluded(a)
pub type Compare(a) =
fn(a, a) -> order.Order
pub type Ranges(a) {
Ranges(
segments: List(#(Bound(a), Bound(a))),
compare: fn(a, a) -> order.Order,
)
}
Constructors
-
Ranges( segments: List(#(Bound(a), Bound(a))), compare: fn(a, a) -> order.Order, )
Values
pub fn between(
compare: fn(a, a) -> order.Order,
lower: a,
upper: a,
) -> Ranges(a)
pub fn compare(ranges: Ranges(a)) -> fn(a, a) -> order.Order
pub fn empty(compare: fn(a, a) -> order.Order) -> Ranges(a)
pub fn from_range_bounds(
compare: fn(a, a) -> order.Order,
start: a,
end: a,
) -> Ranges(a)
pub fn full(compare: fn(a, a) -> order.Order) -> Ranges(a)
pub fn higher_than(
compare: fn(a, a) -> order.Order,
value: a,
) -> Ranges(a)
pub fn lower_than(
compare: fn(a, a) -> order.Order,
value: a,
) -> Ranges(a)
pub fn singleton(
compare: fn(a, a) -> order.Order,
value: a,
) -> Ranges(a)
pub fn strictly_higher_than(
compare: fn(a, a) -> order.Order,
value: a,
) -> Ranges(a)
pub fn strictly_lower_than(
compare: fn(a, a) -> order.Order,
value: a,
) -> Ranges(a)