unsafe fn from_borrowed_ptr_or_err(
        py: Python<'p>,
        ptr: *mut ffi::PyObject,
    ) -> PyResult<&'p Self> {
        Self::from_borrowed_ptr_or_opt(py, ptr).ok_or_else(|| err::PyErr::api_call_failed(py))
    }
/// Convert from an arbitrary borrowed `PyObject`.
///
/// # Safety
///
/// Relies on unsafe fn [`from_borrowed_ptr_or_opt`](#method.from_borrowed_ptr_or_opt).
Convert from an arbitrary borrowed `PyObject`.
Convert from an arbitrary borrowed ` PyObject ` .
unsafe fn from_borrowed_ptr_or_err(
        py: Python<'p>,
        ptr: *mut ffi::PyObject,
    ) -> PyResult<&'p Self> {
        Self::from_borrowed_ptr_or_opt(py, ptr).ok_or_else(|| err::PyErr::api_call_failed(py))
    }
unsafe fn from_borrowed_ptr_or_err ( py : Python < ' p > , ptr : * mut ffi :: PyObject , ) -> PyResult < & ' p Self > { Self :: from_borrowed_ptr_or_opt ( py , ptr ) . ok_or_else ( | | err :: PyErr :: api_call_failed ( py ) ) }
Convert from an arbitrary borrowed `PyObject`.
Convert from an arbitrary borrowed ` PyObject ` .
py
Python<'p>
ptr
*mut ffi::PyObject
safety
Relies on unsafe fn [`from_borrowed_ptr_or_opt`](#method.from_borrowed_ptr_or_opt).
Relies on unsafe fn [ ` from_borrowed_ptr_or_opt ` ] ( #method . from_borrowed_ptr_or_opt ) .