Skip to main content

TryPartialEq

Trait TryPartialEq 

Source
pub trait TryPartialEq<Rhs: ?Sized = Self> {
    type Error;

    // Required method
    fn try_eq(&self, other: &Rhs) -> Result<bool, Self::Error>;

    // Provided method
    fn try_ne(&self, other: &Rhs) -> Result<bool, Self::Error> { ... }
}
Expand description

The try trait for PartialEq.

Required Associated Types§

Source

type Error

The type returned in the event of an error.

Required Methods§

Source

fn try_eq(&self, other: &Rhs) -> Result<bool, Self::Error>

The fallible equivalent of PartialEq::eq.

Provided Methods§

Source

fn try_ne(&self, other: &Rhs) -> Result<bool, Self::Error>

The fallible equivalent of PartialEq::ne.

Implementors§

Source§

impl<T: PartialEq<Rhs>, Rhs: ?Sized> TryPartialEq<Rhs> for T