Class Subspace :: sus :: ops :: RangeFrom

template <class T>
class RangeFrom final
requires
sus::cmp::Ord<T>
{ ... };

A range only bounded inclusively below (start..).

The RangeFrom start.. contains all values with x >= start.

A RangeFrom can be constructed as a literal as "start.."_r.

Note: Overflow in the Iterator implementation returned by iter() and into_iter() (when the contained data type reaches its numerical limit) is allowed to panic, wrap, or saturate. For integer types like usize integers, this follows the normal rules will panic if usize + 1_usize would otherwise panic in the build configuration. Note also that overflow happens earlier than you might assume: the overflow happens in the call to next that yields the maximum value, as the range must be set to a state to yield the next value.

Static Methods

RangeFrom()
requires
sus::construct::Default<T>

Methods

auto contains(const T& item) const -> bool

Returns true if item is contained in the range.

Part of the sus::ops::RangeBounds trait.

auto end_at(T t) const& -> Range<T>
requires
sus::mem::Copy<T>
auto end_at(T t) && -> Range<T>

Return a new Range that starts at where the original Range did and ends at t.

auto end_bound() const& -> Option<const T&>
auto end_bound() && -> Option<const T&>
deleted

Returns None for the end of the RangeBounds.

Part of the sus::ops::RangeBounds trait.

auto start_at(T t) const& -> RangeFrom<T>
requires
sus::mem::Copy<T>
auto start_at(T t) && -> RangeFrom<T>

Return a new RangeFrom that starts at t and still has no end.

auto start_bound() const& -> Option<const T&>
auto start_bound() && -> Option<const T&>
deleted

Returns the beginning of the RangeBounds, inclusive of its own value.

Part of the sus::ops::RangeBounds trait.

Operators

auto operator==(const RangeFrom<T>& rhs) const -> bool
requires
sus::cmp::Eq<T>

Data Members

The beginning of the range, inclusive of the given value.