◐ Shell
clean mode source ↗

rustpython_vm::pyobject::PyIterable - Rust

An iterable Python object.

PyIterable implements FromArgs so that a built-in function can accept an object that is required to conform to the Python iterator protocol.

PyIterable can optionally perform type checking and conversions on iterated objects using a generic type parameter that implements TryFromObject.

impl<T> PyIterable<T>[src]

pub fn iter<'a>(&self, vm: &'a VirtualMachine) -> PyResult<PyIterator<'a, T>>[src]

Returns an iterator over this sequence of objects.

This operation may fail if an exception is raised while invoking the __iter__ method of the iterable object.

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]

fn from(t: T) -> T[src]

Performs the conversion.

impl<T> FromArgs for T where
    T: TryFromObject
[src]

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

fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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

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

fn vzip(self) -> V