Struct rant::RantRange[][src]

pub struct RantRange { /* fields omitted */ }

Implementations

impl RantRange[src]

pub fn new(start: i64, end: i64, abs_step: u64) -> Self[src]

impl RantRange[src]

pub fn start(&self) -> i64[src]

Gets the start bound of the range.

pub fn end(&self) -> i64[src]

Gets the end bound of the range.

pub fn abs_step(&self) -> u64[src]

Gets the absolute step value of the range.

pub fn step(&self) -> i64[src]

Gets the signed step value of the range.

pub fn abs_size(&self) -> usize[src]

Gets the absolute difference between the start and end bounds, ignoring the step size.

pub fn len(&self) -> usize[src]

Gets the total number of steps in the range, taking into account the step size.

pub fn reversed(&self) -> Self[src]

Gets a reversed copy of the range.

pub fn is_empty(&self) -> bool[src]

Indicates whether there are no steps in the range.

pub fn get(&self, index: usize) -> Option<i64>[src]

Gets the nth value in the range.

pub fn sliced(&self, from: Option<usize>, to: Option<usize>) -> Option<Self>[src]

pub fn to_list(&self) -> RantList[src]

Enumerates the values of the range and returns the results as a Rant list object.

Trait Implementations

impl Clone for RantRange[src]

impl Debug for RantRange[src]

impl Default for RantRange[src]

impl Display for RantRange[src]

impl PartialEq<RantRange> for RantRange[src]

impl StructuralPartialEq for RantRange[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,