std::Range<T>
Range<T>
Represents a range of values of type T
Constructors
Range
Creates a range from first to last with specified step
Range(self, first: T, last: T, step: isize = 1)
Range
Creates a range from 0 to last with step 1
Range(self, last: T)
Operators
operator in
Iterator operator for range-based loops
op in fn iter(self) -> yield T
operator in
Contains operator to check if value is in range
op in fn contains(self, value: T) -> bool
Methods
begin
Returns the beginning value of the range
begin(self) -> T
end
Returns the ending value of the range
end(self) -> T
step
Returns the step value of the range
step(self) -> T
contains
Checks if a value is within the range
contains(self, value: const T&) -> bool
is_empty
Checks if the range is empty
is_empty(self) -> bool