pub trait Eq { fn eq(&self, other: &Self) -> bool; fn ne(&self, other: &Self) -> bool { ... } }
Trait for values that can be compared for equality and inequality.
This trait allows partial equality, where types can be unordered instead of strictly equal or
unequal. For example, with the built-in floating-point types a == b
and a != b
will both
evaluate to false if either a
or b
is NaN (cf. IEEE 754-2008 section 5.11).
Eq only requires the eq
method to be implemented; ne
is its negation by default.
Eventually, this will be implemented by default for types that implement TotalEq
.
fn eq(&self, other: &Self) -> bool
fn ne(&self, other: &Self) -> bool
BorrowRecord
uv_membership
uv_req_type
uv_handle_type
IoErrorKind
SocketAddr
IpAddr
EffortLevel
KillHandle
NonCopyable
SelectArm<'self>
PluralKeyword
PluralArm<'self>
Method<'self>
Count
Flag
Alignment
Position<'self>
FormatSpec<'self>
Argument<'self>
Piece<'self>
PosixPath
WindowsPath
LoanState
SchedMode
TaskResult
Cell<T>
HashSet<T>
HashMap<K, V>
Either<L, R>
Result<T, E>
Option<T>
WriterType
FPCategory
Ordering
SendStr
Ascii
impl Eq for int
impl Eq for i8
impl Eq for i16
impl Eq for i32
impl Eq for i64
impl Eq for uint
impl Eq for u8
impl Eq for u16
impl Eq for u32
impl Eq for u64
impl Eq for float
impl Eq for f32
impl Eq for f64
impl Eq for ()
impl Eq for bool
impl Eq for char
impl<A: Eq> Eq for (A)
impl<A: Eq, B: Eq> Eq for (A, B)
impl<A: Eq, B: Eq, C: Eq> Eq for (A, B, C)
impl<A: Eq, B: Eq, C: Eq, D: Eq> Eq for (A, B, C, D)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq> Eq for (A, B, C, D, E)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq> Eq for (A, B, C, D, E, F)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq> Eq for (A, B, C, D, E, F, G)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq, H: Eq> Eq for (A, B, C, D, E, F, G, H)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq, H: Eq, I: Eq> Eq for (A, B, C, D, E, F, G, H, I)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq, H: Eq, I: Eq, J: Eq> Eq for (A, B, C, D, E, F, G, H, I, J)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq, H: Eq, I: Eq, J: Eq, K: Eq> Eq for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq, H: Eq, I: Eq, J: Eq, K: Eq, L: Eq> Eq for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<'self, T: Eq> Eq for &'self [T]
impl<T: Eq> Eq for ~[T]
impl<T: Eq> Eq for @[T]
impl<'self> Eq for &'self str
impl Eq for ~str
impl Eq for @str
impl<_R> Eq for "C" fn() -> _R
impl<_R, A> Eq for "C" fn(A) -> _R
impl<_R, A, B> Eq for "C" fn(A, B) -> _R
impl<_R, A, B, C> Eq for "C" fn(A, B, C) -> _R
impl<_R, A, B, C, D> Eq for "C" fn(A, B, C, D) -> _R
impl<_R, A, B, C, D, E> Eq for "C" fn(A, B, C, D, E) -> _R
impl<T> Eq for *T
impl<T> Eq for *mut T
impl<T: Eq> Eq for ~T
impl<T: Eq> Eq for @T
impl<T: Eq> Eq for @mut T
impl<'self, T: Eq> Eq for &'self T
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).