[−][src]Type Definition rustpython_vm::pyobject::PyObjectRef
type PyObjectRef = Rc<PyObject<dyn PyObjectPayload>>;
The PyObjectRef
is one of the most used types. It is a reference to a
python object. A single python object can have multiple references, and
this reference counting is accounted for by this type. Use the .clone()
method to create a new reference and increment the amount of references
to the python object by 1.
Trait Implementations
impl TypeProtocol for PyObjectRef
[src]
fn class(&self) -> PyClassRef
[src]
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
fn del_item<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> PyResult
[src]
impl BufferProtocol for PyObjectRef
[src]
impl<T> TryIntoRef<T> for PyObjectRef where
T: PyValue,
[src]
T: PyValue,