pub fn matches<T>(&self, py: Python, exc: T) -> bool
    where
        T: ToBorrowedObject,
    {
        exc.with_borrowed_ptr(py, |exc| unsafe {
            ffi::PyErr_GivenExceptionMatches(self.ptype_ptr(py), exc) != 0
        })
    }
/// Returns true if the current exception matches the exception in `exc`.
///
/// If `exc` is a class object, this also returns `true` when `self` is an instance of a subclass.
/// If `exc` is a tuple, all exceptions in the tuple (and recursively in subtuples) are searched for a match.
Returns true if the current exception matches the exception in `exc`.
Returns true if the current exception matches the exception in ` exc ` .
pub fn matches<T>(&self, py: Python, exc: T) -> bool
    where
        T: ToBorrowedObject,
    {
        exc.with_borrowed_ptr(py, |exc| unsafe {
            ffi::PyErr_GivenExceptionMatches(self.ptype_ptr(py), exc) != 0
        })
    }
pub fn matches < T > ( & self , py : Python , exc : T ) -> bool where T : ToBorrowedObject , { exc . with_borrowed_ptr ( py , | exc | unsafe { ffi :: PyErr_GivenExceptionMatches ( self . ptype_ptr ( py ) , exc ) != 0 } ) }
Returns true if the current exception matches the exception in `exc`.
Returns true if the current exception matches the exception in ` exc ` .
&self
py
Python
exc
T