pyo3::impl_::pyclass::assertions

Function assert_pyclass_sync

Source
pub const fn assert_pyclass_sync<T>()
where T: PyClassSync + Sync,
Expand description

Helper function that can be used at compile time to emit a diagnostic if the type does not implement Sync when it should.

The mere act of invoking this function will cause the diagnostic to be emitted if T does not implement Sync when it should.

The additional const IS_SYNC: bool parameter is used to allow the custom diagnostic to be emitted; if PyClassSync

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here