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::fetch(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::fetch(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 :: fetch ( py ) ) }
Convert from an arbitrary borrowed `PyObject`.
Convert from an arbitrary borrowed ` PyObject ` .
py
Python<'p>
ptr
*mut ffi::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 ) .