pub trait PartialEq<Rhs = Self> where
Rhs: ?Sized, {
fn eq(&self, other: &Rhs) -> bool;
fn ne(&self, other: &Rhs) -> bool { ... }
}
Expand description
Trait for equality comparisons which are partial equivalence relations.
x.eq(y)
can also be written x == y
, and x.ne(y)
can be written x != y
.
We use the easier-to-read infix notation in the remainder of this documentation.
This trait allows for partial equality, for types that do not have a full
equivalence relation. For example, in floating point numbers NaN != NaN
,
so floating point types implement PartialEq
but not Eq
.
Implementations must ensure that eq
and ne
are consistent with each other:
a != b
if and only if!(a == b)
(ensured by the default implementation).
If PartialOrd
or Ord
are also implemented for Self
and Rhs
, their methods must also
be consistent with PartialEq
(see the documentation of those traits for the exact
requirements). It’s easy to accidentally make them disagree by deriving some of the traits and
manually implementing others.
The equality relation ==
must satisfy the following conditions
(for all a
, b
, c
of type A
, B
, C
):
-
Symmetric: if
A: PartialEq<B>
andB: PartialEq<A>
, thena == b
impliesb == a
; and -
Transitive: if
A: PartialEq<B>
andB: PartialEq<C>
andA: PartialEq<C>
, thena == b
andb == c
impliesa == c
.
Note that the B: PartialEq<A>
(symmetric) and A: PartialEq<C>
(transitive) impls are not forced to exist, but these requirements apply
whenever they do exist.
Derivable
This trait can be used with #[derive]
. When derive
d on structs, two
instances are equal if all fields are equal, and not equal if any fields
are not equal. When derive
d on enums, each variant is equal to itself
and not equal to the other variants.
How can I implement PartialEq
?
An example implementation for a domain in which two books are considered the same book if their ISBN matches, even if the formats differ:
enum BookFormat {
Paperback,
Hardback,
Ebook,
}
struct Book {
isbn: i32,
format: BookFormat,
}
impl PartialEq for Book {
fn eq(&self, other: &Self) -> bool {
self.isbn == other.isbn
}
}
let b1 = Book { isbn: 3, format: BookFormat::Paperback };
let b2 = Book { isbn: 3, format: BookFormat::Ebook };
let b3 = Book { isbn: 10, format: BookFormat::Paperback };
assert!(b1 == b2);
assert!(b1 != b3);
How can I compare two different types?
The type you can compare with is controlled by PartialEq
’s type parameter.
For example, let’s tweak our previous code a bit:
// The derive implements <BookFormat> == <BookFormat> comparisons
#[derive(PartialEq)]
enum BookFormat {
Paperback,
Hardback,
Ebook,
}
struct Book {
isbn: i32,
format: BookFormat,
}
// Implement <Book> == <BookFormat> comparisons
impl PartialEq<BookFormat> for Book {
fn eq(&self, other: &BookFormat) -> bool {
self.format == *other
}
}
// Implement <BookFormat> == <Book> comparisons
impl PartialEq<Book> for BookFormat {
fn eq(&self, other: &Book) -> bool {
*self == other.format
}
}
let b1 = Book { isbn: 3, format: BookFormat::Paperback };
assert!(b1 == BookFormat::Paperback);
assert!(BookFormat::Ebook != b1);
By changing impl PartialEq for Book
to impl PartialEq<BookFormat> for Book
,
we allow BookFormat
s to be compared with Book
s.
A comparison like the one above, which ignores some fields of the struct,
can be dangerous. It can easily lead to an unintended violation of the
requirements for a partial equivalence relation. For example, if we kept
the above implementation of PartialEq<Book>
for BookFormat
and added an
implementation of PartialEq<Book>
for Book
(either via a #[derive]
or
via the manual implementation from the first example) then the result would
violate transitivity:
#[derive(PartialEq)]
enum BookFormat {
Paperback,
Hardback,
Ebook,
}
#[derive(PartialEq)]
struct Book {
isbn: i32,
format: BookFormat,
}
impl PartialEq<BookFormat> for Book {
fn eq(&self, other: &BookFormat) -> bool {
self.format == *other
}
}
impl PartialEq<Book> for BookFormat {
fn eq(&self, other: &Book) -> bool {
*self == other.format
}
}
fn main() {
let b1 = Book { isbn: 1, format: BookFormat::Paperback };
let b2 = Book { isbn: 2, format: BookFormat::Paperback };
assert!(b1 == BookFormat::Paperback);
assert!(BookFormat::Paperback == b2);
// The following should hold by transitivity but doesn't.
assert!(b1 == b2); // <-- PANICS
}
Examples
let x: u32 = 0;
let y: u32 = 1;
assert_eq!(x == y, false);
assert_eq!(x.eq(&y), false);
Required methods
Provided methods
Implementations on Foreign Types
sourceimpl<K, V, S> PartialEq<HashMap<K, V, S>> for HashMap<K, V, S> where
K: Eq + Hash,
V: PartialEq<V>,
S: BuildHasher,
impl<K, V, S> PartialEq<HashMap<K, V, S>> for HashMap<K, V, S> where
K: Eq + Hash,
V: PartialEq<V>,
S: BuildHasher,
1.58.0 · sourceimpl PartialEq<FromVecWithNulError> for FromVecWithNulError
impl PartialEq<FromVecWithNulError> for FromVecWithNulError
fn eq(&self, other: &FromVecWithNulError) -> bool
fn ne(&self, other: &FromVecWithNulError) -> bool
1.12.0 · sourceimpl PartialEq<RecvTimeoutError> for RecvTimeoutError
impl PartialEq<RecvTimeoutError> for RecvTimeoutError
fn eq(&self, other: &RecvTimeoutError) -> bool
sourceimpl PartialEq<TryRecvError> for TryRecvError
impl PartialEq<TryRecvError> for TryRecvError
fn eq(&self, other: &TryRecvError) -> bool
sourceimpl<'a> PartialEq<Components<'a>> for Components<'a>
impl<'a> PartialEq<Components<'a>> for Components<'a>
fn eq(&self, other: &Components<'a>) -> bool
sourceimpl<T> PartialEq<SyncOnceCell<T>> for SyncOnceCell<T> where
T: PartialEq<T>,
impl<T> PartialEq<SyncOnceCell<T>> for SyncOnceCell<T> where
T: PartialEq<T>,
fn eq(&self, other: &SyncOnceCell<T>) -> bool
sourceimpl PartialEq<AddrParseError> for AddrParseError
impl PartialEq<AddrParseError> for AddrParseError
fn eq(&self, other: &AddrParseError) -> bool
fn ne(&self, other: &AddrParseError) -> bool
sourceimpl PartialEq<BacktraceStyle> for BacktraceStyle
impl PartialEq<BacktraceStyle> for BacktraceStyle
fn eq(&self, other: &BacktraceStyle) -> bool
1.8.0 · sourceimpl PartialEq<SystemTime> for SystemTime
impl PartialEq<SystemTime> for SystemTime
fn eq(&self, other: &SystemTime) -> bool
fn ne(&self, other: &SystemTime) -> bool
sourceimpl PartialEq<Permissions> for Permissions
impl PartialEq<Permissions> for Permissions
fn eq(&self, other: &Permissions) -> bool
fn ne(&self, other: &Permissions) -> bool
sourceimpl PartialEq<SocketAddr> for SocketAddr
impl PartialEq<SocketAddr> for SocketAddr
fn eq(&self, other: &SocketAddr) -> bool
fn ne(&self, other: &SocketAddr) -> bool
1.7.0 · sourceimpl PartialEq<StripPrefixError> for StripPrefixError
impl PartialEq<StripPrefixError> for StripPrefixError
fn eq(&self, other: &StripPrefixError) -> bool
fn ne(&self, other: &StripPrefixError) -> bool
sourceimpl PartialEq<ExitStatusError> for ExitStatusError
impl PartialEq<ExitStatusError> for ExitStatusError
fn eq(&self, other: &ExitStatusError) -> bool
fn ne(&self, other: &ExitStatusError) -> bool
sourceimpl<'a> PartialEq<PrefixComponent<'a>> for PrefixComponent<'a>
impl<'a> PartialEq<PrefixComponent<'a>> for PrefixComponent<'a>
fn eq(&self, other: &PrefixComponent<'a>) -> bool
1.7.0 · sourceimpl PartialEq<IntoStringError> for IntoStringError
impl PartialEq<IntoStringError> for IntoStringError
fn eq(&self, other: &IntoStringError) -> bool
fn ne(&self, other: &IntoStringError) -> bool
sourceimpl PartialEq<SocketAddrV6> for SocketAddrV6
impl PartialEq<SocketAddrV6> for SocketAddrV6
fn eq(&self, other: &SocketAddrV6) -> bool
1.5.0 · sourceimpl PartialEq<WaitTimeoutResult> for WaitTimeoutResult
impl PartialEq<WaitTimeoutResult> for WaitTimeoutResult
fn eq(&self, other: &WaitTimeoutResult) -> bool
fn ne(&self, other: &WaitTimeoutResult) -> bool
1.26.0 · sourceimpl PartialEq<AccessError> for AccessError
impl PartialEq<AccessError> for AccessError
fn eq(&self, other: &AccessError) -> bool
sourceimpl PartialEq<ExitStatus> for ExitStatus
impl PartialEq<ExitStatus> for ExitStatus
fn eq(&self, other: &ExitStatus) -> bool
fn ne(&self, other: &ExitStatus) -> bool
sourceimpl<T> PartialEq<TrySendError<T>> for TrySendError<T> where
T: PartialEq<T>,
impl<T> PartialEq<TrySendError<T>> for TrySendError<T> where
T: PartialEq<T>,
fn eq(&self, other: &TrySendError<T>) -> bool
fn ne(&self, other: &TrySendError<T>) -> bool
1.10.0 · sourceimpl PartialEq<FromBytesWithNulError> for FromBytesWithNulError
impl PartialEq<FromBytesWithNulError> for FromBytesWithNulError
fn eq(&self, other: &FromBytesWithNulError) -> bool
fn ne(&self, other: &FromBytesWithNulError) -> bool
sourceimpl PartialEq<Ipv6MulticastScope> for Ipv6MulticastScope
impl PartialEq<Ipv6MulticastScope> for Ipv6MulticastScope
fn eq(&self, other: &Ipv6MulticastScope) -> bool
sourceimpl PartialEq<SocketAddrV4> for SocketAddrV4
impl PartialEq<SocketAddrV4> for SocketAddrV4
fn eq(&self, other: &SocketAddrV4) -> bool
sourceimpl PartialEq<BacktraceStatus> for BacktraceStatus
impl PartialEq<BacktraceStatus> for BacktraceStatus
fn eq(&self, other: &BacktraceStatus) -> bool
1.4.0 · sourceimpl<Ret, A, B, C, D, E> PartialEq<fn(A, B, C, D, E) -> Ret> for fn(A, B, C, D, E) -> Ret
impl<Ret, A, B, C, D, E> PartialEq<fn(A, B, C, D, E) -> Ret> for fn(A, B, C, D, E) -> Ret
sourceimpl<A, B, C, D, E, F, G, H, I, J> PartialEq<(A, B, C, D, E, F, G, H, I, J)> for (A, B, C, D, E, F, G, H, I, J) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I>,
J: PartialEq<J> + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J> PartialEq<(A, B, C, D, E, F, G, H, I, J)> for (A, B, C, D, E, F, G, H, I, J) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I>,
J: PartialEq<J> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G> PartialEq<extern "C" fn(A, B, C, D, E, F, G) -> Ret> for extern "C" fn(A, B, C, D, E, F, G) -> Ret
impl<Ret, A, B, C, D, E, F, G> PartialEq<extern "C" fn(A, B, C, D, E, F, G) -> Ret> for extern "C" fn(A, B, C, D, E, F, G) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C> PartialEq<extern "C" fn(A, B, C) -> Ret> for extern "C" fn(A, B, C) -> Ret
impl<Ret, A, B, C> PartialEq<extern "C" fn(A, B, C) -> Ret> for extern "C" fn(A, B, C) -> Ret
sourceimpl<A, B, C, D, E> PartialEq<(A, B, C, D, E)> for (A, B, C, D, E) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E> + ?Sized,
impl<A, B, C, D, E> PartialEq<(A, B, C, D, E)> for (A, B, C, D, E) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B> PartialEq<extern "C" fn(A, B, ...) -> Ret> for extern "C" fn(A, B, ...) -> Ret
impl<Ret, A, B> PartialEq<extern "C" fn(A, B, ...) -> Ret> for extern "C" fn(A, B, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B> PartialEq<unsafe extern "C" fn(A, B, ...) -> Ret> for unsafe extern "C" fn(A, B, ...) -> Ret
impl<Ret, A, B> PartialEq<unsafe extern "C" fn(A, B, ...) -> Ret> for unsafe extern "C" fn(A, B, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D> PartialEq<extern "C" fn(A, B, C, D) -> Ret> for extern "C" fn(A, B, C, D) -> Ret
impl<Ret, A, B, C, D> PartialEq<extern "C" fn(A, B, C, D) -> Ret> for extern "C" fn(A, B, C, D) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C> PartialEq<unsafe extern "C" fn(A, B, C, ...) -> Ret> for unsafe extern "C" fn(A, B, C, ...) -> Ret
impl<Ret, A, B, C> PartialEq<unsafe extern "C" fn(A, B, C, ...) -> Ret> for unsafe extern "C" fn(A, B, C, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I, J) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret
1.4.0 · sourceimpl<Ret, A> PartialEq<unsafe extern "C" fn(A) -> Ret> for unsafe extern "C" fn(A) -> Ret
impl<Ret, A> PartialEq<unsafe extern "C" fn(A) -> Ret> for unsafe extern "C" fn(A) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E> PartialEq<unsafe extern "C" fn(A, B, C, D, E) -> Ret> for unsafe extern "C" fn(A, B, C, D, E) -> Ret
impl<Ret, A, B, C, D, E> PartialEq<unsafe extern "C" fn(A, B, C, D, E) -> Ret> for unsafe extern "C" fn(A, B, C, D, E) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E> PartialEq<extern "C" fn(A, B, C, D, E) -> Ret> for extern "C" fn(A, B, C, D, E) -> Ret
impl<Ret, A, B, C, D, E> PartialEq<extern "C" fn(A, B, C, D, E) -> Ret> for extern "C" fn(A, B, C, D, E) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D> PartialEq<extern "C" fn(A, B, C, D, ...) -> Ret> for extern "C" fn(A, B, C, D, ...) -> Ret
impl<Ret, A, B, C, D> PartialEq<extern "C" fn(A, B, C, D, ...) -> Ret> for extern "C" fn(A, B, C, D, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret
sourceimpl<A, B, C, D> PartialEq<(A, B, C, D)> for (A, B, C, D) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D> + ?Sized,
impl<A, B, C, D> PartialEq<(A, B, C, D)> for (A, B, C, D) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B, C, D> PartialEq<unsafe extern "C" fn(A, B, C, D) -> Ret> for unsafe extern "C" fn(A, B, C, D) -> Ret
impl<Ret, A, B, C, D> PartialEq<unsafe extern "C" fn(A, B, C, D) -> Ret> for unsafe extern "C" fn(A, B, C, D) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G> PartialEq<unsafe fn(A, B, C, D, E, F, G) -> Ret> for unsafe fn(A, B, C, D, E, F, G) -> Ret
impl<Ret, A, B, C, D, E, F, G> PartialEq<unsafe fn(A, B, C, D, E, F, G) -> Ret> for unsafe fn(A, B, C, D, E, F, G) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F> PartialEq<extern "C" fn(A, B, C, D, E, F, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, ...) -> Ret
impl<Ret, A, B, C, D, E, F> PartialEq<extern "C" fn(A, B, C, D, E, F, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F> PartialEq<extern "C" fn(A, B, C, D, E, F) -> Ret> for extern "C" fn(A, B, C, D, E, F) -> Ret
impl<Ret, A, B, C, D, E, F> PartialEq<extern "C" fn(A, B, C, D, E, F) -> Ret> for extern "C" fn(A, B, C, D, E, F) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C> PartialEq<extern "C" fn(A, B, C, ...) -> Ret> for extern "C" fn(A, B, C, ...) -> Ret
impl<Ret, A, B, C> PartialEq<extern "C" fn(A, B, C, ...) -> Ret> for extern "C" fn(A, B, C, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D> PartialEq<unsafe fn(A, B, C, D) -> Ret> for unsafe fn(A, B, C, D) -> Ret
impl<Ret, A, B, C, D> PartialEq<unsafe fn(A, B, C, D) -> Ret> for unsafe fn(A, B, C, D) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<unsafe fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
sourceimpl<A, B, C, D, E, F, G, H, I> PartialEq<(A, B, C, D, E, F, G, H, I)> for (A, B, C, D, E, F, G, H, I) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I> + ?Sized,
impl<A, B, C, D, E, F, G, H, I> PartialEq<(A, B, C, D, E, F, G, H, I)> for (A, B, C, D, E, F, G, H, I) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I> + ?Sized,
sourceimpl<A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I>,
J: PartialEq<J>,
K: PartialEq<K>,
L: PartialEq<L> + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I>,
J: PartialEq<J>,
K: PartialEq<K>,
L: PartialEq<L> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B> PartialEq<unsafe extern "C" fn(A, B) -> Ret> for unsafe extern "C" fn(A, B) -> Ret
impl<Ret, A, B> PartialEq<unsafe extern "C" fn(A, B) -> Ret> for unsafe extern "C" fn(A, B) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F> PartialEq<fn(A, B, C, D, E, F) -> Ret> for fn(A, B, C, D, E, F) -> Ret
impl<Ret, A, B, C, D, E, F> PartialEq<fn(A, B, C, D, E, F) -> Ret> for fn(A, B, C, D, E, F) -> Ret
sourceimpl<A, B, C, D, E, F, G, H, I, J, K> PartialEq<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I>,
J: PartialEq<J>,
K: PartialEq<K> + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K> PartialEq<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H>,
I: PartialEq<I>,
J: PartialEq<J>,
K: PartialEq<K> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B, C, D> PartialEq<unsafe extern "C" fn(A, B, C, D, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, ...) -> Ret
impl<Ret, A, B, C, D> PartialEq<unsafe extern "C" fn(A, B, C, D, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for fn(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for fn(A, B, C, D, E, F, G, H, I, J) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret> for fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
sourceimpl<A, B, C, D, E, F, G> PartialEq<(A, B, C, D, E, F, G)> for (A, B, C, D, E, F, G) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G> + ?Sized,
impl<A, B, C, D, E, F, G> PartialEq<(A, B, C, D, E, F, G)> for (A, B, C, D, E, F, G) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F> PartialEq<unsafe fn(A, B, C, D, E, F) -> Ret> for unsafe fn(A, B, C, D, E, F) -> Ret
impl<Ret, A, B, C, D, E, F> PartialEq<unsafe fn(A, B, C, D, E, F) -> Ret> for unsafe fn(A, B, C, D, E, F) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<fn(A, B, C, D, E, F, G, H, I) -> Ret> for fn(A, B, C, D, E, F, G, H, I) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<fn(A, B, C, D, E, F, G, H, I) -> Ret> for fn(A, B, C, D, E, F, G, H, I) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E> PartialEq<unsafe fn(A, B, C, D, E) -> Ret> for unsafe fn(A, B, C, D, E) -> Ret
impl<Ret, A, B, C, D, E> PartialEq<unsafe fn(A, B, C, D, E) -> Ret> for unsafe fn(A, B, C, D, E) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret
sourceimpl<A, B, C, D, E, F, G, H> PartialEq<(A, B, C, D, E, F, G, H)> for (A, B, C, D, E, F, G, H) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H> + ?Sized,
impl<A, B, C, D, E, F, G, H> PartialEq<(A, B, C, D, E, F, G, H)> for (A, B, C, D, E, F, G, H) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F>,
G: PartialEq<G>,
H: PartialEq<H> + ?Sized,
sourceimpl<A, B, C, D, E, F> PartialEq<(A, B, C, D, E, F)> for (A, B, C, D, E, F) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F> + ?Sized,
impl<A, B, C, D, E, F> PartialEq<(A, B, C, D, E, F)> for (A, B, C, D, E, F) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C>,
D: PartialEq<D>,
E: PartialEq<E>,
F: PartialEq<F> + ?Sized,
1.4.0 · sourceimpl<Ret, A, B, C, D, E> PartialEq<extern "C" fn(A, B, C, D, E, ...) -> Ret> for extern "C" fn(A, B, C, D, E, ...) -> Ret
impl<Ret, A, B, C, D, E> PartialEq<extern "C" fn(A, B, C, D, E, ...) -> Ret> for extern "C" fn(A, B, C, D, E, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C> PartialEq<unsafe extern "C" fn(A, B, C) -> Ret> for unsafe extern "C" fn(A, B, C) -> Ret
impl<Ret, A, B, C> PartialEq<unsafe extern "C" fn(A, B, C) -> Ret> for unsafe extern "C" fn(A, B, C) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, ...) -> Ret
impl<Ret, A, B, C, D, E, F> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H> PartialEq<fn(A, B, C, D, E, F, G, H) -> Ret> for fn(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> PartialEq<fn(A, B, C, D, E, F, G, H) -> Ret> for fn(A, B, C, D, E, F, G, H) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret> for fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G, H) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G, H) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H> PartialEq<unsafe fn(A, B, C, D, E, F, G, H) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> PartialEq<unsafe fn(A, B, C, D, E, F, G, H) -> Ret> for unsafe fn(A, B, C, D, E, F, G, H) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E> PartialEq<unsafe extern "C" fn(A, B, C, D, E, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, ...) -> Ret
impl<Ret, A, B, C, D, E> PartialEq<unsafe extern "C" fn(A, B, C, D, E, ...) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G> PartialEq<extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G> PartialEq<extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G> PartialEq<fn(A, B, C, D, E, F, G) -> Ret> for fn(A, B, C, D, E, F, G) -> Ret
impl<Ret, A, B, C, D, E, F, G> PartialEq<fn(A, B, C, D, E, F, G) -> Ret> for fn(A, B, C, D, E, F, G) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F) -> Ret
impl<Ret, A, B, C, D, E, F> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret> for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
1.4.0 · sourceimpl<Ret, A, B, C, D, E, F, G> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G) -> Ret
impl<Ret, A, B, C, D, E, F, G> PartialEq<unsafe extern "C" fn(A, B, C, D, E, F, G) -> Ret> for unsafe extern "C" fn(A, B, C, D, E, F, G) -> Ret
sourceimpl<A, B, C> PartialEq<(A, B, C)> for (A, B, C) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C> + ?Sized,
impl<A, B, C> PartialEq<(A, B, C)> for (A, B, C) where
A: PartialEq<A>,
B: PartialEq<B>,
C: PartialEq<C> + ?Sized,
1.4.0 · sourceimpl<Ret, A> PartialEq<unsafe extern "C" fn(A, ...) -> Ret> for unsafe extern "C" fn(A, ...) -> Ret
impl<Ret, A> PartialEq<unsafe extern "C" fn(A, ...) -> Ret> for unsafe extern "C" fn(A, ...) -> Ret
sourceimpl<'_, '_, A, B> PartialEq<&'_ mut B> for &'_ mut A where
A: PartialEq<B> + ?Sized,
B: ?Sized,
impl<'_, '_, A, B> PartialEq<&'_ mut B> for &'_ mut A where
A: PartialEq<B> + ?Sized,
B: ?Sized,
sourceimpl PartialEq<TryReserveErrorKind> for TryReserveErrorKind
impl PartialEq<TryReserveErrorKind> for TryReserveErrorKind
fn eq(&self, other: &TryReserveErrorKind) -> bool
fn ne(&self, other: &TryReserveErrorKind) -> bool
1.57.0 · sourceimpl PartialEq<TryReserveError> for TryReserveError
impl PartialEq<TryReserveError> for TryReserveError
fn eq(&self, other: &TryReserveError) -> bool
fn ne(&self, other: &TryReserveError) -> bool
1.17.0 · sourceimpl<'_, T, U, A, const N: usize> PartialEq<&'_ [U; N]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A, const N: usize> PartialEq<&'_ [U; N]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
1.17.0 · sourceimpl<'_, T, U, A, const N: usize> PartialEq<&'_ mut [U; N]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A, const N: usize> PartialEq<&'_ mut [U; N]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
1.17.0 · sourceimpl<T, U, A, const N: usize> PartialEq<[U; N]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<T, U, A, const N: usize> PartialEq<[U; N]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
sourceimpl<'a, 'b, B, C> PartialEq<Cow<'b, C>> for Cow<'a, B> where
B: PartialEq<C> + ToOwned + ?Sized,
C: ToOwned + ?Sized,
impl<'a, 'b, B, C> PartialEq<Cow<'b, C>> for Cow<'a, B> where
B: PartialEq<C> + ToOwned + ?Sized,
C: ToOwned + ?Sized,
sourceimpl PartialEq<FromUtf8Error> for FromUtf8Error
impl PartialEq<FromUtf8Error> for FromUtf8Error
fn eq(&self, other: &FromUtf8Error) -> bool
fn ne(&self, other: &FromUtf8Error) -> bool
1.17.0 · sourceimpl<'_, T, U, A> PartialEq<&'_ mut [U]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A> PartialEq<&'_ mut [U]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
1.17.0 · sourceimpl<T, U, A> PartialEq<Vec<U, A>> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<T, U, A> PartialEq<Vec<U, A>> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
sourceimpl<T> PartialEq<LinkedList<T>> for LinkedList<T> where
T: PartialEq<T>,
impl<T> PartialEq<LinkedList<T>> for LinkedList<T> where
T: PartialEq<T>,
fn eq(&self, other: &LinkedList<T>) -> bool
fn ne(&self, other: &LinkedList<T>) -> bool
sourceimpl<'_, T, U, A, const N: usize> PartialEq<&'_ [U; N]> for Vec<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A, const N: usize> PartialEq<&'_ [U; N]> for Vec<T, A> where
A: Allocator,
T: PartialEq<U>,
sourceimpl<T> PartialEq<Rc<T>> for Rc<T> where
T: PartialEq<T> + ?Sized,
impl<T> PartialEq<Rc<T>> for Rc<T> where
T: PartialEq<T> + ?Sized,
sourcefn eq(&self, other: &Rc<T>) -> bool
fn eq(&self, other: &Rc<T>) -> bool
Equality for two Rc
s.
Two Rc
s are equal if their inner values are equal, even if they are
stored in different allocation.
If T
also implements Eq
(implying reflexivity of equality),
two Rc
s that point to the same allocation are
always equal.
Examples
use std::rc::Rc;
let five = Rc::new(5);
assert!(five == Rc::new(5));
sourcefn ne(&self, other: &Rc<T>) -> bool
fn ne(&self, other: &Rc<T>) -> bool
Inequality for two Rc
s.
Two Rc
s are unequal if their inner values are unequal.
If T
also implements Eq
(implying reflexivity of equality),
two Rc
s that point to the same allocation are
never unequal.
Examples
use std::rc::Rc;
let five = Rc::new(5);
assert!(five != Rc::new(6));
1.46.0 · sourceimpl<'_, T, U, A> PartialEq<Vec<U, A>> for &'_ mut [T] where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A> PartialEq<Vec<U, A>> for &'_ mut [T] where
A: Allocator,
T: PartialEq<U>,
1.46.0 · sourceimpl<'_, T, U, A> PartialEq<Vec<U, A>> for &'_ [T] where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A> PartialEq<Vec<U, A>> for &'_ [T] where
A: Allocator,
T: PartialEq<U>,
1.17.0 · sourceimpl<'_, T, U, A> PartialEq<&'_ [U]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
impl<'_, T, U, A> PartialEq<&'_ [U]> for VecDeque<T, A> where
A: Allocator,
T: PartialEq<U>,
sourceimpl<'_, T, U, A> PartialEq<Vec<U, A>> for Cow<'_, [T]> where
A: Allocator,
T: PartialEq<U> + Clone,
impl<'_, T, U, A> PartialEq<Vec<U, A>> for Cow<'_, [T]> where
A: Allocator,
T: PartialEq<U> + Clone,
sourceimpl<K, V> PartialEq<BTreeMap<K, V>> for BTreeMap<K, V> where
K: PartialEq<K>,
V: PartialEq<V>,
impl<K, V> PartialEq<BTreeMap<K, V>> for BTreeMap<K, V> where
K: PartialEq<K>,
V: PartialEq<V>,
sourceimpl<T> PartialEq<Arc<T>> for Arc<T> where
T: PartialEq<T> + ?Sized,
impl<T> PartialEq<Arc<T>> for Arc<T> where
T: PartialEq<T> + ?Sized,
sourcefn eq(&self, other: &Arc<T>) -> bool
fn eq(&self, other: &Arc<T>) -> bool
Equality for two Arc
s.
Two Arc
s are equal if their inner values are equal, even if they are
stored in different allocation.
If T
also implements Eq
(implying reflexivity of equality),
two Arc
s that point to the same allocation are always equal.
Examples
use std::sync::Arc;
let five = Arc::new(5);
assert!(five == Arc::new(5));
sourcefn ne(&self, other: &Arc<T>) -> bool
fn ne(&self, other: &Arc<T>) -> bool
Inequality for two Arc
s.
Two Arc
s are unequal if their inner values are unequal.
If T
also implements Eq
(implying reflexivity of equality),
two Arc
s that point to the same value are never unequal.
Examples
use std::sync::Arc;
let five = Arc::new(5);
assert!(five != Arc::new(6));