pub struct PyIterable<T = PyObjectRef> { /* fields omitted */ }
An iterable Python object.
PyIterable
implementsFromArgs
so that a built-in function can acceptan object that is required to conform to the Python iterator protocol.
PyIterable can optionally perform type checking and conversions on iteratedobjects using a generic type parameter that implementsTryFromObject
.
impl<T>PyIterable<T>
[src]pub fniter<'a>(&self, vm: &'aVirtualMachine) ->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>TryFromObject forPyIterable<T>where
T:TryFromObject,
[src]fntry_from_object(vm: &VirtualMachine, obj:PyObjectRef) ->PyResult<Self>
[src]impl<T = Rc<PyObject<dynPyObjectPayload + 'static>>> !RefUnwindSafe forPyIterable<T>
impl<T = Rc<PyObject<dynPyObjectPayload + 'static>>> !Send forPyIterable<T>
impl<T = Rc<PyObject<dynPyObjectPayload + 'static>>> !Sync forPyIterable<T>
impl<T>Unpin forPyIterable<T>where
T:Unpin,
impl<T = Rc<PyObject<dynPyObjectPayload + 'static>>> !UnwindSafe forPyIterable<T>
impl<T>Any for Twhere
T: 'static + ?Sized,
[src]impl<T>Borrow<T> for Twhere
T: ?Sized,
[src]impl<T>BorrowMut<T> for Twhere
T: ?Sized,
[src]fnborrow_mut(&mut self) ->&mutT
[src]impl<T>From<T> for T
[src]impl<T>FromArgs for Twhere
T:TryFromObject,
[src]fnarity() ->RangeInclusive<usize>
[src]fnfrom_args(&VirtualMachine, &mutPyFuncArgs) ->Result<T,ArgumentError>
[src]impl<T, U>Into<U> for Twhere
U:From<T>,
[src]impl<T> Same<T> for T
typeOutput = T
Should always beSelf
impl<T, U>TryFrom<U> for Twhere
U:Into<T>,
[src]typeError =Infallible
The type returned in the event of a conversion error.
fntry_from(value: U) ->Result<T, <T asTryFrom<U>>::Error>
[src]impl<T, U>TryInto<U> for Twhere
U:TryFrom<T>,
[src]typeError = <U asTryFrom<T>>::Error
The type returned in the event of a conversion error.
fntry_into(self) ->Result<U, <U asTryFrom<T>>::Error>
[src]impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fnvzip(self) -> V