pyo3::impl_::pyclass

Struct 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