Struct arrange::IntRange[][src]

pub struct IntRange { /* fields omitted */ }

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 type.

Trait Implementations

impl Debug for IntRange[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.