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

Method iter

src/objectprotocol.rs:331–334  ·  view source on GitHub ↗
(&self, py: Python<'p>)

Source from the content-addressed store, hash-verified

329 /// is an iterator, this returns itself.
330 #[inline]
331 fn iter<'p>(&self, py: Python<'p>) -> PyResult<crate::objects::PyIterator<'p>> {
332 let obj = unsafe { err::result_from_owned_ptr(py, ffi::PyObject_GetIter(self.as_ptr())) }?;
333 Ok(crate::objects::PyIterator::from_object(py, obj)?)
334 }
335}
336
337impl ObjectProtocol for PyObject {}

Callers

nothing calls this directly

Implementers 1

objectprotocol.rssrc/objectprotocol.rs

Calls 2

result_from_owned_ptrFunction · 0.85
as_ptrMethod · 0.45

Tested by

no test coverage detected