[][src]Struct rustpython_vm::obj::objrange::PyRange

pub struct PyRange {
    pub start: PyIntRef,
    pub stop: PyIntRef,
    pub step: PyIntRef,
}

range(stop) -> range object range(start, stop[, step]) -> range object

Return an object that produces a sequence of integers from start (inclusive) to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1. start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3. These are exactly the valid indices for a list of 4 elements. When step is given, it specifies the increment (or decrement).

Fields

start: PyIntRefstop: PyIntRefstep: PyIntRef

Methods

impl PyRange[src]

pub fn index_of(&self, value: &BigInt) -> Option<BigInt>[src]

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

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

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

Trait Implementations

impl Clone for PyRange[src]

impl Debug for PyRange[src]

impl PyClassDef for PyRange[src]

impl PyClassImpl for PyRange[src]

impl PyValue for PyRange[src]

Auto Trait Implementations

impl !RefUnwindSafe for PyRange

impl !Send for PyRange

impl !Sync for PyRange

impl Unpin for PyRange

impl !UnwindSafe for PyRange

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> IntoPyObject for T where
    T: PyValue
[src]

impl<T> PyObjectPayload for T where
    T: 'static + PyValue
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,