[−][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 BufferProtocol for PyObjectRef[src]
impl<'a, T: PyValue> From<&'a PyRef<T>> for &'a PyObjectRef[src]
impl<T: PyValue> From<PyRef<T>> for PyObjectRef[src]
impl IntoPyObject for PyObjectRef[src]
fn into_pyobject(self, _vm: &VirtualMachine) -> PyResult[src]
impl<'_> IntoPyObject for &'_ PyObjectRef[src]
fn into_pyobject(self, _vm: &VirtualMachine) -> PyResult[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 TryFromObject for PyObjectRef[src]
fn try_from_object(_vm: &VirtualMachine, obj: PyObjectRef) -> PyResult<Self>[src]
impl<T> TryIntoRef<T> for PyObjectRef where
T: PyValue, [src]
T: PyValue,