pub trait PyPayload:
Debug
+ MaybeTraverse
+ PyThreadingConstraint
+ Sized
+ 'static {
// Required method
fn class(ctx: &Context) -> &'static Py<PyType>;
// Provided methods
fn into_pyobject(self, vm: &VirtualMachine) -> PyObjectRef { ... }
fn _into_ref(self, cls: PyTypeRef, ctx: &Context) -> PyRef<Self> { ... }
fn into_exact_ref(self, ctx: &Context) -> PyRefExact<Self> { ... }
fn into_ref(self, ctx: &Context) -> PyRef<Self> { ... }
fn into_ref_with_type(
self,
vm: &VirtualMachine,
cls: PyTypeRef,
) -> PyResult<PyRef<Self>> { ... }
}
Required Methods§
Provided Methods§
fn into_pyobject(self, vm: &VirtualMachine) -> PyObjectRef
fn _into_ref(self, cls: PyTypeRef, ctx: &Context) -> PyRef<Self>
fn into_exact_ref(self, ctx: &Context) -> PyRefExact<Self>
fn into_ref(self, ctx: &Context) -> PyRef<Self>
fn into_ref_with_type( self, vm: &VirtualMachine, cls: PyTypeRef, ) -> PyResult<PyRef<Self>>
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.