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
1.12.0 · sourceimpl PartialEq<RecvTimeoutError> for RecvTimeoutError
impl PartialEq<RecvTimeoutError> for RecvTimeoutError
fn eq(&self, other: &RecvTimeoutError) -> bool
sourceimpl PartialEq<ExitStatus> for ExitStatus
impl PartialEq<ExitStatus> for ExitStatus
fn eq(&self, other: &ExitStatus) -> bool
fn ne(&self, other: &ExitStatus) -> 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<BacktraceStyle> for BacktraceStyle
impl PartialEq<BacktraceStyle> for BacktraceStyle
fn eq(&self, other: &BacktraceStyle) -> bool
sourceimpl PartialEq<TryRecvError> for TryRecvError
impl PartialEq<TryRecvError> for TryRecvError
fn eq(&self, other: &TryRecvError) -> bool
sourceimpl PartialEq<AddrParseError> for AddrParseError
impl PartialEq<AddrParseError> for AddrParseError
fn eq(&self, other: &AddrParseError) -> bool
fn ne(&self, other: &AddrParseError) -> 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
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
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
sourceimpl PartialEq<Ipv6MulticastScope> for Ipv6MulticastScope
impl PartialEq<Ipv6MulticastScope> for Ipv6MulticastScope
fn eq(&self, other: &Ipv6MulticastScope) -> 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
sourceimpl<'a> PartialEq<PrefixComponent<'a>> for PrefixComponent<'a>
impl<'a> PartialEq<PrefixComponent<'a>> for PrefixComponent<'a>
fn eq(&self, other: &PrefixComponent<'a>) -> 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.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<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<ExitStatusError> for ExitStatusError
impl PartialEq<ExitStatusError> for ExitStatusError
fn eq(&self, other: &ExitStatusError) -> bool
fn ne(&self, other: &ExitStatusError) -> bool
1.26.0 · sourceimpl PartialEq<AccessError> for AccessError
impl PartialEq<AccessError> for AccessError
fn eq(&self, other: &AccessError) -> bool
sourceimpl PartialEq<SocketAddrV6> for SocketAddrV6
impl PartialEq<SocketAddrV6> for SocketAddrV6
fn eq(&self, other: &SocketAddrV6) -> bool
sourceimpl PartialEq<BacktraceStatus> for BacktraceStatus
impl PartialEq<BacktraceStatus> for BacktraceStatus
fn eq(&self, other: &BacktraceStatus) -> 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 PartialEq<SocketAddrV4> for SocketAddrV4
impl PartialEq<SocketAddrV4> for SocketAddrV4
fn eq(&self, other: &SocketAddrV4) -> 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.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
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, 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> 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, 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<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> 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, 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, 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, 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
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> 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> 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> 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<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.36.0 · sourceimpl PartialEq<RawWakerVTable> for RawWakerVTable
impl PartialEq<RawWakerVTable> for RawWakerVTable
fn eq(&self, other: &RawWakerVTable) -> bool
fn ne(&self, other: &RawWakerVTable) -> bool
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, 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> 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
sourceimpl<T, const LANES: usize> PartialEq<Simd<T, LANES>> for Simd<T, LANES> where
T: SimdElement + PartialEq<T>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> PartialEq<Simd<T, LANES>> for Simd<T, LANES> where
T: SimdElement + PartialEq<T>,
LaneCount<LANES>: SupportedLaneCount,
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
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, 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> 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
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> 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.27.0 · sourceimpl PartialEq<CpuidResult> for CpuidResult
impl PartialEq<CpuidResult> for CpuidResult
fn eq(&self, other: &CpuidResult) -> bool
fn ne(&self, other: &CpuidResult) -> bool
1.41.0 · sourceimpl<P, Q> PartialEq<Pin<Q>> for Pin<P> where
P: Deref,
Q: Deref,
<P as Deref>::Target: PartialEq<<Q as Deref>::Target>,
impl<P, Q> PartialEq<Pin<Q>> for Pin<P> where
P: Deref,
Q: Deref,
<P as Deref>::Target: PartialEq<<Q as Deref>::Target>,
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,
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, 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,
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, 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, 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, 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> 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, 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, 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.34.0 · sourceimpl PartialEq<Infallible> for Infallible
impl PartialEq<Infallible> for Infallible
fn eq(&self, &Infallible) -> bool
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
sourceimpl PartialEq<FromFloatSecsError> for FromFloatSecsError
impl PartialEq<FromFloatSecsError> for FromFloatSecsError
fn eq(&self, other: &FromFloatSecsError) -> bool
fn ne(&self, other: &FromFloatSecsError) -> bool
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<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> 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, 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> 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> 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
sourceimpl<T, const LANES: usize> PartialEq<Mask<T, LANES>> for Mask<T, LANES> where
T: MaskElement + PartialEq<T>,
LaneCount<LANES>: SupportedLaneCount,
impl<T, const LANES: usize> PartialEq<Mask<T, LANES>> for Mask<T, LANES> where
T: MaskElement + PartialEq<T>,
LaneCount<LANES>: SupportedLaneCount,
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<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> 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,
sourceimpl<Dyn> PartialEq<DynMetadata<Dyn>> for DynMetadata<Dyn> where
Dyn: ?Sized,
impl<Dyn> PartialEq<DynMetadata<Dyn>> for DynMetadata<Dyn> where
Dyn: ?Sized,
fn eq(&self, other: &DynMetadata<Dyn>) -> bool
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, 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
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,
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> PartialEq<Utf8LossyChunk<'a>> for Utf8LossyChunk<'a>
impl<'a> PartialEq<Utf8LossyChunk<'a>> for Utf8LossyChunk<'a>
fn eq(&self, other: &Utf8LossyChunk<'a>) -> bool
fn ne(&self, other: &Utf8LossyChunk<'a>) -> bool
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> 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> 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.9.0 · sourceimpl PartialEq<DecodeUtf16Error> for DecodeUtf16Error
impl PartialEq<DecodeUtf16Error> for DecodeUtf16Error
fn eq(&self, other: &DecodeUtf16Error) -> bool
fn ne(&self, other: &DecodeUtf16Error) -> bool
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> 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
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,
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, 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, 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> 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> 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> 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.20.0 · sourceimpl PartialEq<ParseCharError> for ParseCharError
impl PartialEq<ParseCharError> for ParseCharError
fn eq(&self, other: &ParseCharError) -> bool
fn ne(&self, other: &ParseCharError) -> bool
1.59.0 · sourceimpl PartialEq<TryFromCharError> for TryFromCharError
impl PartialEq<TryFromCharError> for TryFromCharError
fn eq(&self, other: &TryFromCharError) -> bool
fn ne(&self, other: &TryFromCharError) -> bool
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, 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
sourceimpl PartialEq<ParseBoolError> for ParseBoolError
impl PartialEq<ParseBoolError> for ParseBoolError
fn eq(&self, other: &ParseBoolError) -> bool
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, 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.50.0 · sourceimpl PartialEq<LayoutError> for LayoutError
impl PartialEq<LayoutError> for LayoutError
fn eq(&self, other: &LayoutError) -> bool
sourceimpl PartialEq<AllocError> for AllocError
impl PartialEq<AllocError> for AllocError
fn eq(&self, other: &AllocError) -> bool
sourceimpl PartialEq<SearchStep> for SearchStep
impl PartialEq<SearchStep> for SearchStep
fn eq(&self, other: &SearchStep) -> bool
fn ne(&self, other: &SearchStep) -> bool
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> 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.34.0 · sourceimpl PartialEq<CharTryFromError> for CharTryFromError
impl PartialEq<CharTryFromError> for CharTryFromError
fn eq(&self, other: &CharTryFromError) -> bool
fn ne(&self, other: &CharTryFromError) -> bool
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, 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
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.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>,
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));
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>,
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));
sourceimpl PartialEq<OptionBool> for OptionBool
impl PartialEq<OptionBool> for OptionBool
fn eq(&self, other: &OptionBool) -> bool
fn ne(&self, other: &OptionBool) -> bool
sourceimpl<'a, T> PartialEq<CompactRef<'a, T>> for CompactRef<'a, T> where
T: PartialEq<T>,
impl<'a, T> PartialEq<CompactRef<'a, T>> for CompactRef<'a, T> where
T: PartialEq<T>,
fn eq(&self, other: &CompactRef<'a, T>) -> bool
fn ne(&self, other: &CompactRef<'a, T>) -> bool
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
sourceimpl<const CAP: usize> PartialEq<ArrayString<CAP>> for ArrayString<CAP>
impl<const CAP: usize> PartialEq<ArrayString<CAP>> for ArrayString<CAP>
fn eq(&self, rhs: &ArrayString<CAP>) -> bool
sourceimpl<const CAP: usize> PartialEq<str> for ArrayString<CAP>
impl<const CAP: usize> PartialEq<str> for ArrayString<CAP>
sourceimpl<T, const CAP: usize> PartialEq<ArrayVec<T, CAP>> for ArrayVec<T, CAP> where
T: PartialEq<T>,
impl<T, const CAP: usize> PartialEq<ArrayVec<T, CAP>> for ArrayVec<T, CAP> where
T: PartialEq<T>,
sourceimpl<const CAP: usize> PartialEq<ArrayString<CAP>> for str
impl<const CAP: usize> PartialEq<ArrayString<CAP>> for str
fn eq(&self, rhs: &ArrayString<CAP>) -> bool
sourceimpl<T> PartialEq<CapacityError<T>> for CapacityError<T> where
T: PartialEq<T>,
impl<T> PartialEq<CapacityError<T>> for CapacityError<T> where
T: PartialEq<T>,
fn eq(&self, other: &CapacityError<T>) -> bool
fn ne(&self, other: &CapacityError<T>) -> bool
sourceimpl<'a> PartialEq<Unexpected<'a>> for Unexpected<'a>
impl<'a> PartialEq<Unexpected<'a>> for Unexpected<'a>
fn eq(&self, other: &Unexpected<'a>) -> bool
fn ne(&self, other: &Unexpected<'a>) -> bool
sourceimpl<O1, A, O2, T> PartialEq<BitArray<A, O2>> for BitSlice<T, O1> where
O1: BitOrder,
O2: BitOrder,
A: BitViewSized,
T: BitStore,
impl<O1, A, O2, T> PartialEq<BitArray<A, O2>> for BitSlice<T, O1> where
O1: BitOrder,
O2: BitOrder,
A: BitViewSized,
T: BitStore,
sourceimpl<T> PartialEq<BitSpanError<T>> for BitSpanError<T> where
T: PartialEq<T> + BitStore,
impl<T> PartialEq<BitSpanError<T>> for BitSpanError<T> where
T: PartialEq<T> + BitStore,
fn eq(&self, other: &BitSpanError<T>) -> bool
fn ne(&self, other: &BitSpanError<T>) -> bool
sourceimpl<'_, '_, M, T, O> PartialEq<&'_ bool> for BitRef<'_, M, T, O> where
M: Mutability,
T: BitStore,
O: BitOrder,
impl<'_, '_, M, T, O> PartialEq<&'_ bool> for BitRef<'_, M, T, O> where
M: Mutability,
T: BitStore,
O: BitOrder,
sourceimpl<R> PartialEq<BitIdxError<R>> for BitIdxError<R> where
R: PartialEq<R> + BitRegister,
impl<R> PartialEq<BitIdxError<R>> for BitIdxError<R> where
R: PartialEq<R> + BitRegister,
fn eq(&self, other: &BitIdxError<R>) -> bool
fn ne(&self, other: &BitIdxError<R>) -> bool
sourceimpl<'a, T, O> PartialEq<IterZeros<'a, T, O>> for IterZeros<'a, T, O> where
T: PartialEq<T> + 'a + BitStore,
O: PartialEq<O> + BitOrder,
impl<'a, T, O> PartialEq<IterZeros<'a, T, O>> for IterZeros<'a, T, O> where
T: PartialEq<T> + 'a + BitStore,
O: PartialEq<O> + BitOrder,
sourceimpl<'_, '_, M, T, O> PartialEq<BitRef<'_, M, T, O>> for &'_ bool where
M: Mutability,
T: BitStore,
O: BitOrder,
impl<'_, '_, M, T, O> PartialEq<BitRef<'_, M, T, O>> for &'_ bool where
M: Mutability,
T: BitStore,
O: BitOrder,
sourceimpl<'_, O1, O2, T1, T2> PartialEq<BitBox<T2, O2>> for &'_ BitSlice<T1, O1> where
O1: BitOrder,
O2: BitOrder,
T1: BitStore,
T2: BitStore,
impl<'_, O1, O2, T1, T2> PartialEq<BitBox<T2, O2>> for &'_ BitSlice<T1, O1> where
O1: BitOrder,
O2: BitOrder,
T1: BitStore,
T2: BitStore,
sourceimpl<T, O, Rhs> PartialEq<Rhs> for BitVec<T, O> where
T: BitStore,
O: BitOrder,
Rhs: PartialEq<BitSlice<T, O>> + ?Sized,
impl<T, O, Rhs> PartialEq<Rhs> for BitVec<T, O> where
T: BitStore,
O: BitOrder,
Rhs: PartialEq<BitSlice<T, O>> + ?Sized,
sourceimpl<M1, M2, O, T1, T2> PartialEq<BitPtrRange<M2, T2, O>> for BitPtrRange<M1, T1, O> where
M1: Mutability,
M2: Mutability,
O: BitOrder,
T1: BitStore,
T2: BitStore,
impl<M1, M2, O, T1, T2> PartialEq<BitPtrRange<M2, T2, O>> for BitPtrRange<M1, T1, O> where
M1: Mutability,
M2: Mutability,
O: BitOrder,
T1: BitStore,
T2: BitStore,
fn eq(&self, other: &BitPtrRange<M2, T2, O>) -> bool
sourceimpl<T> PartialEq<BitPtrError<T>> for BitPtrError<T> where
T: PartialEq<T> + BitStore,
impl<T> PartialEq<BitPtrError<T>> for BitPtrError<T> where
T: PartialEq<T> + BitStore,
fn eq(&self, other: &BitPtrError<T>) -> bool
fn ne(&self, other: &BitPtrError<T>) -> bool
sourceimpl<'_, T1, T2, O1, O2> PartialEq<BitVec<T2, O2>> for &'_ BitSlice<T1, O1> where
T1: BitStore,
T2: BitStore,
O1: BitOrder,
O2: BitOrder,
impl<'_, T1, T2, O1, O2> PartialEq<BitVec<T2, O2>> for &'_ BitSlice<T1, O1> where
T1: BitStore,
T2: BitStore,
O1: BitOrder,
O2: BitOrder,
sourceimpl<T1, T2, O1, O2> PartialEq<BitSlice<T2, O2>> for BitSlice<T1, O1> where
T1: BitStore,
T2: BitStore,
O1: BitOrder,
O2: BitOrder,
impl<T1, T2, O1, O2> PartialEq<BitSlice<T2, O2>> for BitSlice<T1, O1> where
T1: BitStore,
T2: BitStore,
O1: BitOrder,
O2: BitOrder,
Tests if two BitSlice
s are semantically — not representationally — equal.
It is valid to compare slices of different ordering or memory types.
The equality condition requires that they have the same length and that at each index, the two slices have the same bit value.