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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.