pub trait PyMutexTrait<'a, T: ?Sized + 'a>: Sealed<'a, T> {
// Required methods
#[doc(hidden)] unsafe fn data(&'a self) -> &'a UnsafeCell<T>;
#[doc(hidden)] unsafe fn inner(&'a self) -> &'a UnsafeCell<PyMutex>;
}Available on
Py_3_13 and non-Py_LIMITED_API only.Expand description
Required Methods§
Source#[doc(hidden)]unsafe fn data(&'a self) -> &'a UnsafeCell<T>
#[doc(hidden)]unsafe fn data(&'a self) -> &'a UnsafeCell<T>
§Safety
This function may not be called from outside of PyO3
Source#[doc(hidden)]unsafe fn inner(&'a self) -> &'a UnsafeCell<PyMutex>
#[doc(hidden)]unsafe fn inner(&'a self) -> &'a UnsafeCell<PyMutex>
§Safety
This function may not be called from outside of PyO3
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<'a, T, U, D> PyMutexTrait<'a, T> for D
impl<'a, T: ?Sized + 'a> PyMutexTrait<'a, T> for pyo3::sync::mutex::PyMutex<T>
Available on
wip_feature_std only.