[−][src]Type Definition rustpython_vm::obj::objdict::PyDictRef
type PyDictRef = PyRef<PyDict>;
Methods
impl PyDictRef
[src]
pub fn to_attributes(self) -> PyAttributes
[src]
Take a python dictionary and convert it to attributes.
pub fn from_attributes(
attrs: PyAttributes,
vm: &VirtualMachine
) -> PyResult<Self>
[src]
attrs: PyAttributes,
vm: &VirtualMachine
) -> PyResult<Self>
pub fn contains_key<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> bool
[src]
pub fn size(&self) -> DictSize
[src]
Trait Implementations
impl ItemProtocol for PyDictRef
[src]
fn get_item<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> PyResult
[src]
fn set_item<T: IntoPyObject>(
&self,
key: T,
value: PyObjectRef,
vm: &VirtualMachine
) -> PyResult
[src]
&self,
key: T,
value: PyObjectRef,
vm: &VirtualMachine
) -> PyResult
fn del_item<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> PyResult
[src]
fn get_item_option<T: IntoPyObject>(
&self,
key: T,
vm: &VirtualMachine
) -> PyResult<Option<PyObjectRef>>
[src]
&self,
key: T,
vm: &VirtualMachine
) -> PyResult<Option<PyObjectRef>>
impl IntoIterator for PyDictRef
[src]
type Item = (PyObjectRef, PyObjectRef)
The type of the elements being iterated over.
type IntoIter = DictIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'_> IntoIterator for &'_ PyDictRef
[src]
type Item = (PyObjectRef, PyObjectRef)
The type of the elements being iterated over.
type IntoIter = DictIter
Which kind of iterator are we turning this into?