Trait rustpython_vm::convert::TryFromBorrowedObject
source · pub trait TryFromBorrowedObject<'a>: Sizedwhere
Self: 'a,{
// Required method
fn try_from_borrowed_object(
vm: &VirtualMachine,
obj: &'a PyObject
) -> PyResult<Self>;
}
Expand description
Lower-cost variation of TryFromObject
Required Methods§
sourcefn try_from_borrowed_object(
vm: &VirtualMachine,
obj: &'a PyObject
) -> PyResult<Self>
fn try_from_borrowed_object( vm: &VirtualMachine, obj: &'a PyObject ) -> PyResult<Self>
Attempt to convert a Python object to a value of this type.