Struct arrange::IntRange [−][src]
There are three fields that affect the range: start : the starting value of the range stop : the stoping value of the range step : the distance from one element in the range to the next
Please note that the step is unidirectional. we can only move inside the range implicitly set by the start and stop range: If start < stop, then the range is [start,stop). If stop < start, then the range is (stop,start].
Implementations
impl IntRange
[src]
pub fn new(start: i32, stop: i32, step: usize) -> IntRange
[src]
pub fn len(&self) -> usize
[src]
Returns the length of the arrange.
TODO: handle steps that are diff than 1
pub fn range(&self) -> Vec<i32>
[src]
Creates a range of Vec
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IntRange
impl Send for IntRange
impl Sync for IntRange
impl Unpin for IntRange
impl UnwindSafe for IntRange
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,