[][src]Trait rustpython_vm::pyobject::TryIntoRef

pub trait TryIntoRef<T> {
    fn try_into_ref(self, vm: &VirtualMachine) -> PyResult<PyRef<T>>;
}

Allows coercion of a types into PyRefs, so that we can write functions that can take refs, pyobject refs or basic types.

Required methods

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

Loading content...

Implementations on Foreign Types

impl TryIntoRef<PyString> for String[src]

impl<'_> TryIntoRef<PyString> for &'_ str[src]

Loading content...

Implementors

impl<T> TryIntoRef<T> for PyRef<T>[src]

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

Loading content...