Struct pyo3::impl_::pyclass::SendablePyClass

source ·
#[doc(hidden)] pub struct SendablePyClass<T: Send>(PhantomData<T>);
Expand description

Default thread checker for #[pyclass].

Keeping the T: Send bound here slightly improves the compile error message to hint to users to figure out what’s wrong when #[pyclass] types do not implement Send.

Tuple Fields§

§0: PhantomData<T>

Trait Implementations§

source§

impl<T: Send> PyClassThreadChecker<T> for SendablePyClass<T>

source§

fn ensure(&self)

source§

fn check(&self) -> bool

source§

fn can_drop(&self, _py: Python<'_>) -> bool

source§

fn new() -> Self

source§

fn __private__(&self) -> PrivateMarker

This trait is private to implement; this method exists to make it impossible to implement outside the crate.
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here