pub struct RangeFrom<Idx> {
pub start: Idx,
}
Expand description
A range only bounded inclusively below (start..
).
The RangeFrom
start..
contains all values with x >= start
.
Note: Overflow in the Iterator
implementation (when the contained
data type reaches its numerical limit) is allowed to panic, wrap, or
saturate. This behavior is defined by the implementation of the Step
trait. For primitive integers, this follows the normal rules, and respects
the overflow checks profile (panic in debug, wrap in release). 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.
§Examples
The start..
syntax is a RangeFrom
:
Fields§
§start: Idx
The lower bound of the range (inclusive).
Trait Implementations§
Source§impl<T> IntoBounds<T> for RangeFrom<T>
impl<T> IntoBounds<T> for RangeFrom<T>
Source§impl<T> OneSidedRange<T> for RangeFrom<T>where
Self: RangeBounds<T>,
impl<T> OneSidedRange<T> for RangeFrom<T>where
Self: RangeBounds<T>,
Source§fn bound(self) -> (OneSidedRangeBound, T)
fn bound(self) -> (OneSidedRangeBound, T)
🔬This is a nightly-only experimental API. (
one_sided_range
#69780)An internal-only helper function for
split_off
and
split_off_mut
that returns the bound of the one-sided range.