pub unsafe fn extract_receiver_trusted<'a, 'py, T, R>(
bound_ref: &'a Bound<'py, PyAny>,
) -> PyResult<R>Expand description
Fused extraction for receivers which implement TryFrom<&Bound<T>> (e.g. Py<T>,
Bound<T>, PyRef<T>), used to keep the generated code small. Trusted variant: performs an
unchecked cast for extension-type slot receivers where CPython guarantees the receiver type.
§Safety
The caller must ensure that bound_ref is an instance of T. This invariant is upheld by
CPython when dispatching through type slots.