pyo3::impl_::pyclass

Struct ThreadCheckerImpl

Source
#[doc(hidden)] pub struct ThreadCheckerImpl(ThreadId);
Expand description

Thread checker for #[pyclass(unsendable)] types. Panics when the value is accessed by another thread.

Tuple Fields§

§0: ThreadId

Implementations§

Source§

impl ThreadCheckerImpl

Source

fn ensure(&self, type_name: &'static str)

Source

fn check(&self) -> bool

Source

fn can_drop(&self, py: Python<'_>, type_name: &'static str) -> bool

Trait Implementations§

Source§

impl<T> PyClassThreadChecker<T> for ThreadCheckerImpl

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