[−][src]Trait rustpython_vm::pyobject::ItemProtocol
The python item protocol. Mostly applies to dictionaries. Allows getting, setting and deletion of keys-value pairs.
Required methods
fn get_item<T: IntoPyObject + DictKey + Copy>(
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
fn set_item<T: IntoPyObject + DictKey + Copy>(
&self,
key: T,
value: PyObjectRef,
vm: &VirtualMachine
) -> PyResult
&self,
key: T,
value: PyObjectRef,
vm: &VirtualMachine
) -> PyResult
fn del_item<T: IntoPyObject + DictKey + Copy>(
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
Implementors
impl ItemProtocol for PyDictRef
[src]
fn get_item<T: IntoPyObject + DictKey + Copy>(
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
[src]
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
fn set_item<T: IntoPyObject + DictKey + Copy>(
&self,
key: T,
value: PyObjectRef,
vm: &VirtualMachine
) -> PyResult
[src]
&self,
key: T,
value: PyObjectRef,
vm: &VirtualMachine
) -> PyResult
fn del_item<T: IntoPyObject + DictKey + Copy>(
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
[src]
&self,
key: T,
vm: &VirtualMachine
) -> PyResult
impl ItemProtocol for PyObjectRef
[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