โ— Shell
clean mode source โ†—

rustpython_vm::pyobject::PyObjectRef - Rust

[โˆ’][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.

impl BufferProtocol for PyObjectRef[src]

fn readonly(&self) -> bool[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]

fn del_item<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> PyResult[src]

impl TryFromObject for PyObjectRef[src]

impl<T> TryIntoRef<T> for PyObjectRef where
    T: PyValue
[src]

fn try_into_ref(self, vm: &VirtualMachine) -> PyResult<PyRef<T>>[src]

impl TypeProtocol for PyObjectRef[src]

fn class(&self) -> PyClassRef[src]