module std::equalsource
Equality: the Equal interface.
Equal is a lang item (LANGUAGE_SPEC.md section 6.1a) at the canonical
path std::equal::Equal. A type declaring it takes == and != from
its equals (section 4.10), and so does every comparison reaching one
of its values as a part, so a container compares what it holds rather
than how much room it has. The compiler satisfies Equal for every
primitive type through the extensions below, so a T: Equal takes
numbers and bool too; == on a primitive stays the built-in one.
Every enum and struct == compares, each part comparing, satisfies it
with no marker too, its equals being compare_parts below.
interface Equalsource
exp interface Equal
Required functions
fn equals(self: &, other: &Self) -> bool;
Implemented by
fn equalssource
exp fn equals(self value: &u8, other: &u8) -> bool
fn equalssource
exp fn equals(self value: &u16, other: &u16) -> bool
fn equalssource
exp fn equals(self value: &u32, other: &u32) -> bool
fn equalssource
exp fn equals(self value: &u64, other: &u64) -> bool
fn equalssource
exp fn equals(self value: &i8, other: &i8) -> bool
fn equalssource
exp fn equals(self value: &i16, other: &i16) -> bool
fn equalssource
exp fn equals(self value: &i32, other: &i32) -> bool
fn equalssource
exp fn equals(self value: &i64, other: &i64) -> bool
fn equalssource
exp fn equals(self value: &f32, other: &f32) -> bool
fn equalssource
exp fn equals(self value: &f64, other: &f64) -> bool
fn equalssource
exp fn equals(self value: &bool, other: &bool) -> bool