PartialEq

Trait PartialEq 

Source
pub trait PartialEq<Rhs = Self> {
    // Required method
    fn eq(&self, other: &Rhs) -> bool;

    // Provided method
    fn ne(&self, other: &Rhs) -> bool { ... }
}

Required Methods§

Source

fn eq(&self, other: &Rhs) -> bool

This method tests for self and other values to be equal, and is used by ==.

Provided Methods§

Source

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementations on Foreign Types§

Source§

impl PartialEq for bool

Source§

fn eq(&self, rhs: &bool) -> bool

Source§

impl PartialEq for f32

Source§

fn eq(&self, rhs: &f32) -> bool

Source§

impl PartialEq for f64

Source§

fn eq(&self, rhs: &f64) -> bool

Source§

impl PartialEq for i8

Source§

fn eq(&self, rhs: &i8) -> bool

Source§

impl PartialEq for i16

Source§

fn eq(&self, rhs: &i16) -> bool

Source§

impl PartialEq for i32

Source§

fn eq(&self, rhs: &i32) -> bool

Source§

impl PartialEq for i64

Source§

fn eq(&self, rhs: &i64) -> bool

Source§

impl PartialEq for i128

Source§

fn eq(&self, rhs: &i128) -> bool

Source§

impl PartialEq for isize

Source§

fn eq(&self, rhs: &isize) -> bool

Source§

impl PartialEq for u8

Source§

fn eq(&self, rhs: &u8) -> bool

Source§

impl PartialEq for u16

Source§

fn eq(&self, rhs: &u16) -> bool

Source§

impl PartialEq for u32

Source§

fn eq(&self, rhs: &u32) -> bool

Source§

impl PartialEq for u64

Source§

fn eq(&self, rhs: &u64) -> bool

Source§

impl PartialEq for u128

Source§

fn eq(&self, rhs: &u128) -> bool

Source§

impl PartialEq for usize

Source§

fn eq(&self, rhs: &usize) -> bool

Implementors§