MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / PyIterator

Class PyIterator

src/objects/iterator.rs:29–32  ·  view source on GitHub ↗

A python iterator object. Unlike other python objects, this class includes a `Python<'p>` token so that PyIterator can implement the rust `Iterator` trait.

Source from the content-addressed store, hash-verified

27/// Unlike other python objects, this class includes a `Python<'p>` token
28/// so that PyIterator can implement the rust `Iterator` trait.
29pub struct PyIterator<'p> {
30 py: Python<'p>,
31 iter: PyObject,
32}
33
34impl<'p> PyIterator<'p> {
35 /// Constructs a PyIterator from a Python iterator object.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected