Trait rustpython_vm::convert::ToPyObject
source · pub trait ToPyObject {
// Required method
fn to_pyobject(self, vm: &VirtualMachine) -> PyObjectRef;
}Expand description
Implemented by any type that can be returned from a built-in Python function.
ToPyObject has a blanket implementation for any built-in object payload,
and should be implemented by many primitive Rust types, allowing a built-in
function to simply return a bool or a usize for example.