Trait PyRangeMethods

Source
pub trait PyRangeMethods<'py>: Sealed {
    // Required methods
    fn start(&self) -> PyResult<isize>;
    fn stop(&self) -> PyResult<isize>;
    fn step(&self) -> PyResult<isize>;
}
Expand description

Implementation of functionality for PyRange.

These methods are defined for the Bound<'py, PyRange> smart pointer, so to use method call syntax these methods are separated into a trait, because stable Rust does not yet support arbitrary_self_types.

Required Methods§

Source

fn start(&self) -> PyResult<isize>

Returns the start of the range.

Source

fn stop(&self) -> PyResult<isize>

Returns the exclusive end of the range.

Source

fn step(&self) -> PyResult<isize>

Returns the step of the range.

Implementors§

Source§

impl<'py> PyRangeMethods<'py> for Bound<'py, PyRange>