Skip to main content

Destructor

Trait Destructor 

Source
pub trait Destructor: PyPayload {
    const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;

    // Required method
    fn del(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<()>;

    // Provided methods
    fn slot_del(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<()> { ... }
    fn __extend_py_class(ctx: &'static Context, class: &'static Py<PyType>) { ... }
    fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}

Provided Associated Constants§

Source

const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _

Required Methods§

Source

fn del(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<()>

Provided Methods§

Source

fn slot_del(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<()>

Source

fn __extend_py_class(ctx: &'static Context, class: &'static Py<PyType>)

Source

fn __extend_slots(slots: &mut PyTypeSlots)

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.

Implementors§

Source§

impl Destructor for PyAsyncGen

_PyGen_Finalize for async generators

Source§

impl Destructor for PyCoroutine

Source§

impl Destructor for PyGenerator