Struct pyo3::impl_::pyclass::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