pyo3::pycell::impl_

Trait PyClassObjectLayout

Source
#[doc(hidden)] pub trait PyClassObjectLayout<T>: PyLayout<T> {
    // Required methods
    fn ensure_threadsafe(&self);
    fn check_threadsafe(&self) -> Result<(), PyBorrowError>;
    unsafe fn tp_dealloc(py: Python<'_>, slf: *mut PyObject);
}

Required Methods§

Source

fn ensure_threadsafe(&self)

Source

fn check_threadsafe(&self) -> Result<(), PyBorrowError>

Source

unsafe fn tp_dealloc(py: Python<'_>, slf: *mut PyObject)

Implementation of tp_dealloc.

§Safety
  • slf must be a valid pointer to an instance of a T or a subclass.
  • slf must not be used after this call (as it will be freed).

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§

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here