Skip to main content

PyDictRef

Type Alias PyDictRef 

Source
pub type PyDictRef = PyRef<PyDict>;

Aliased Type§

pub struct PyDictRef { /* private fields */ }

Methods from Deref<Target = Py<T>>§

Source

pub fn downgrade( &self, callback: Option<PyObjectRef>, vm: &VirtualMachine, ) -> PyResult<PyWeakRef<T>>

Source

pub fn payload(&self) -> &T

Source

pub fn to_base(&self) -> &Py<T::Base>

Converts &Py<T> to &Py<T::Base>.

Source

pub fn upcast_ref<U: PyPayload + StaticType>(&self) -> &Py<U>
where T: StaticType,

Converts &Py<T> to &Py<U> where U is an ancestor type.

Trait Implementations§

Source§

impl IntoIterator for PyDictRef

Source§

type Item = (PyObjectRef, PyObjectRef)

The type of the elements being iterated over.
Source§

type IntoIter = DictIntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a PyDictRef

Source§

type Item = (PyObjectRef, PyObjectRef)

The type of the elements being iterated over.
Source§

type IntoIter = DictIter<'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more