Skip to main content

extract_pyclass_ref_mut_trusted

Function extract_pyclass_ref_mut_trusted 

Source
pub unsafe fn extract_pyclass_ref_mut_trusted<'a, 'holder, T: PyClass<Frozen = False>>(
    obj: Borrowed<'a, '_, PyAny>,
    holder: &'holder mut Option<PyClassGuardMut<'a, T>>,
) -> PyResult<&'holder mut T>
Expand description

Trusted variant of extract_pyclass_ref_mut: performs an unchecked cast for extension-type slot receivers where CPython guarantees the receiver type.

§Safety

Same as extract_pyclass_ref_trusted.

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