pub unsafe trait TransmuteFromObject: Sized {
    // Required method
    fn check(vm: &VirtualMachine, obj: &PyObject) -> PyResult<()>;
}
Expand description

Marks a type that has the exact same layout as PyObjectRef, e.g. a type that is repr(transparent) over PyObjectRef.

Safety

Can only be implemented for types that are repr(transparent) over a PyObjectRef obj, and logically valid so long as check(vm, obj) returns Ok(())

Required Methods§

Implementors§