pub trait PartialEq<Rhs = Self>where
Rhs: ?Sized,{
// Required method
fn eq(&self, other: &Rhs) -> bool;
// Provided method
fn ne(&self, other: &Rhs) -> bool { ... }
}
Expand description
Trait for equality comparisons.
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
.
Formally speaking, when Rhs == Self
, this trait corresponds to a partial equivalence
relation.
Implementations must ensure that eq
and ne
are consistent with each other:
a != b
if and only if!(a == b)
.
The default implementation of ne
provides this consistency and is almost
always sufficient. It should not be overridden without very good reason.
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, two instances are equal if they
are the same variant and all fields are equal.
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§
Implementors§
impl PartialEq<&str> for OsString
impl PartialEq<&str> for ArchivedString
impl PartialEq<&CStr> for ArchivedCString
impl PartialEq<RelocationKind> for RelocationKind
impl PartialEq<RelocationTarget> for RelocationTarget
impl PartialEq<CustomSectionProtection> for CustomSectionProtection
impl PartialEq<Symbol> for Symbol
impl PartialEq<CpuFeature> for CpuFeature
impl PartialEq<CompiledFunctionUnwindInfo> for CompiledFunctionUnwindInfo
impl PartialEq<Aarch64Architecture> for Aarch64Architecture
impl PartialEq<Architecture> for Architecture
impl PartialEq<BinaryFormat> for BinaryFormat
impl PartialEq<CallingConvention> for CallingConvention
impl PartialEq<Endianness> for Endianness
impl PartialEq<Environment> for Environment
impl PartialEq<ExportIndex> for ExportIndex
impl PartialEq<ExternType> for ExternType
impl PartialEq<GlobalInit> for GlobalInit
impl PartialEq<ImportIndex> for ImportIndex
impl PartialEq<LibCall> for LibCall
impl PartialEq<MemoryStyle> for MemoryStyle
impl PartialEq<Mutability> for Mutability
impl PartialEq<OperatingSystem> for OperatingSystem
impl PartialEq<PointerWidth> for PointerWidth
impl PartialEq<TableStyle> for TableStyle
impl PartialEq<TrapCode> for TrapCode
impl PartialEq<Type> for Type
impl PartialEq<Vendor> for Vendor
impl PartialEq<MemoryError> for MemoryError
impl PartialEq<Infallible> for Infallible
impl PartialEq<Alignment> for wasmer_types::lib::std::fmt::Alignment
impl PartialEq<Ordering> for wasmer_types::lib::std::sync::atomic::Ordering
impl PartialEq<RecvTimeoutError> for RecvTimeoutError
impl PartialEq<TryRecvError> for TryRecvError
impl PartialEq<Ordering> for wasmer_types::lib::std::cmp::Ordering
impl PartialEq<TryReserveErrorKind> for TryReserveErrorKind
impl PartialEq<Which> for Which
impl PartialEq<IpAddr> for IpAddr
impl PartialEq<IpAddr> for ArchivedIpAddr
impl PartialEq<IpAddr> for Ipv4Addr
impl PartialEq<IpAddr> for Ipv6Addr
impl PartialEq<Ipv6MulticastScope> for Ipv6MulticastScope
impl PartialEq<SocketAddr> for SocketAddr
impl PartialEq<SocketAddr> for ArchivedSocketAddr
impl PartialEq<FpCategory> for FpCategory
impl PartialEq<IntErrorKind> for IntErrorKind
impl PartialEq<SearchStep> for SearchStep
impl PartialEq<BacktraceStatus> for BacktraceStatus
impl PartialEq<VarError> for VarError
impl PartialEq<SeekFrom> for SeekFrom
impl PartialEq<ErrorKind> for ErrorKind
impl PartialEq<Shutdown> for Shutdown
impl PartialEq<BacktraceStyle> for BacktraceStyle
impl PartialEq<_Unwind_Action> for _Unwind_Action
impl PartialEq<_Unwind_Reason_Code> for _Unwind_Reason_Code
impl PartialEq<ArchivedIpAddr> for IpAddr
impl PartialEq<ArchivedIpAddr> for ArchivedIpAddr
impl PartialEq<ArchivedSocketAddr> for SocketAddr
impl PartialEq<ArchivedSocketAddr> for ArchivedSocketAddr
impl PartialEq<OffsetError> for OffsetError
impl PartialEq<CDataModel> for CDataModel
impl PartialEq<Size> for Size
impl PartialEq<ParseError> for ParseError
impl PartialEq<ArmArchitecture> for ArmArchitecture
impl PartialEq<CustomVendor> for CustomVendor
impl PartialEq<Mips32Architecture> for Mips32Architecture
impl PartialEq<Mips64Architecture> for Mips64Architecture
impl PartialEq<Riscv32Architecture> for Riscv32Architecture
impl PartialEq<Riscv64Architecture> for Riscv64Architecture
impl PartialEq<X86_32Architecture> for X86_32Architecture
impl PartialEq<bool> for bool
impl PartialEq<char> for char
impl PartialEq<char> for BigEndian<char>
impl PartialEq<char> for LittleEndian<char>
impl PartialEq<char> for NativeEndian<char>
impl PartialEq<f32> for f32
impl PartialEq<f32> for RawValue
impl PartialEq<f32> for BigEndian<f32>
impl PartialEq<f32> for LittleEndian<f32>
impl PartialEq<f32> for NativeEndian<f32>
impl PartialEq<f64> for f64
impl PartialEq<f64> for RawValue
impl PartialEq<f64> for BigEndian<f64>
impl PartialEq<f64> for LittleEndian<f64>
impl PartialEq<f64> for NativeEndian<f64>
impl PartialEq<i8> for i8
impl PartialEq<i16> for i16
impl PartialEq<i16> for BigEndian<i16>
impl PartialEq<i16> for LittleEndian<i16>
impl PartialEq<i16> for NativeEndian<i16>
impl PartialEq<i32> for i32
impl PartialEq<i32> for RawValue
impl PartialEq<i32> for BigEndian<i32>
impl PartialEq<i32> for LittleEndian<i32>
impl PartialEq<i32> for NativeEndian<i32>
impl PartialEq<i64> for i64
impl PartialEq<i64> for RawValue
impl PartialEq<i64> for BigEndian<i64>
impl PartialEq<i64> for LittleEndian<i64>
impl PartialEq<i64> for NativeEndian<i64>
impl PartialEq<i128> for i128
impl PartialEq<i128> for RawValue
impl PartialEq<i128> for BigEndian<i128>
impl PartialEq<i128> for LittleEndian<i128>
impl PartialEq<i128> for NativeEndian<i128>
impl PartialEq<isize> for isize
impl PartialEq<!> for !
impl PartialEq<str> for str
impl PartialEq<str> for OsStr
impl PartialEq<str> for OsString
impl PartialEq<str> for ArchivedString
impl PartialEq<u8> for u8
impl PartialEq<u16> for u16
impl PartialEq<u16> for BigEndian<u16>
impl PartialEq<u16> for LittleEndian<u16>
impl PartialEq<u16> for NativeEndian<u16>
impl PartialEq<u32> for u32
impl PartialEq<u32> for RawValue
impl PartialEq<u32> for BigEndian<u32>
impl PartialEq<u32> for LittleEndian<u32>
impl PartialEq<u32> for NativeEndian<u32>
impl PartialEq<u64> for u64
impl PartialEq<u64> for RawValue
impl PartialEq<u64> for BigEndian<u64>
impl PartialEq<u64> for LittleEndian<u64>
impl PartialEq<u64> for NativeEndian<u64>
impl PartialEq<u128> for u128
impl PartialEq<u128> for RawValue
impl PartialEq<u128> for BigEndian<u128>
impl PartialEq<u128> for LittleEndian<u128>
impl PartialEq<u128> for NativeEndian<u128>
impl PartialEq<()> for ()
impl PartialEq<usize> for usize
impl PartialEq<FunctionAddressMap> for FunctionAddressMap
impl PartialEq<InstructionAddressMap> for InstructionAddressMap
impl PartialEq<Compilation> for Compilation
impl PartialEq<CompiledFunction> for CompiledFunction
impl PartialEq<CompiledFunctionFrameInfo> for CompiledFunctionFrameInfo
impl PartialEq<Dwarf> for Dwarf
impl PartialEq<FunctionBody> for FunctionBody
impl PartialEq<CompileModuleInfo> for CompileModuleInfo
impl PartialEq<Relocation> for Relocation
impl PartialEq<CustomSection> for CustomSection
impl PartialEq<SectionBody> for SectionBody
impl PartialEq<SectionIndex> for SectionIndex
impl PartialEq<Target> for Target
impl PartialEq<Bytes> for Bytes
impl PartialEq<CustomSectionIndex> for CustomSectionIndex
impl PartialEq<DataIndex> for DataIndex
impl PartialEq<DataInitializerLocation> for DataInitializerLocation
impl PartialEq<ElemIndex> for ElemIndex
impl PartialEq<Features> for Features
impl PartialEq<FunctionIndex> for FunctionIndex
impl PartialEq<FunctionType> for FunctionType
impl PartialEq<GlobalIndex> for GlobalIndex
impl PartialEq<GlobalType> for GlobalType
impl PartialEq<ImportKey> for ImportKey
impl PartialEq<LocalFunctionIndex> for LocalFunctionIndex
impl PartialEq<LocalGlobalIndex> for LocalGlobalIndex
impl PartialEq<LocalMemoryIndex> for LocalMemoryIndex
impl PartialEq<LocalTableIndex> for LocalTableIndex
impl PartialEq<MemoryIndex> for MemoryIndex
impl PartialEq<MemoryType> for MemoryType
impl PartialEq<ModuleInfo> for ModuleInfo
impl PartialEq<OwnedDataInitializer> for OwnedDataInitializer
impl PartialEq<PageCountOutOfRange> for PageCountOutOfRange
impl PartialEq<Pages> for Pages
impl PartialEq<SignatureIndex> for SignatureIndex
impl PartialEq<SourceLoc> for SourceLoc
impl PartialEq<StoreId> for StoreId
impl PartialEq<TableIndex> for TableIndex
impl PartialEq<TableInitializer> for TableInitializer
impl PartialEq<TableType> for TableType
impl PartialEq<TrapInformation> for TrapInformation
impl PartialEq<Triple> for Triple
impl PartialEq<V128> for V128
impl PartialEq<TypeId> for TypeId
impl PartialEq<Error> for wasmer_types::lib::std::fmt::Error
impl PartialEq<PhantomPinned> for PhantomPinned
impl PartialEq<Assume> for Assume
impl PartialEq<RangeFull> for RangeFull
impl PartialEq<Alignment> for wasmer_types::lib::std::ptr::Alignment
impl PartialEq<FromUtf8Error> for FromUtf8Error
impl PartialEq<String> for String
impl PartialEq<String> for ArchivedString
impl PartialEq<RecvError> for RecvError
impl PartialEq<WaitTimeoutResult> for WaitTimeoutResult
impl PartialEq<TryReserveError> for alloc::collections::TryReserveError
impl PartialEq<CString> for CString
impl PartialEq<CString> for ArchivedCString
impl PartialEq<FromVecWithNulError> for FromVecWithNulError
impl PartialEq<IntoStringError> for IntoStringError
impl PartialEq<NulError> for NulError
impl PartialEq<Layout> for Layout
impl PartialEq<LayoutError> for LayoutError
impl PartialEq<AllocError> for AllocError
impl PartialEq<CharTryFromError> for CharTryFromError
impl PartialEq<ParseCharError> for ParseCharError
impl PartialEq<DecodeUtf16Error> for DecodeUtf16Error
impl PartialEq<TryFromCharError> for TryFromCharError
impl PartialEq<CpuidResult> for CpuidResult
impl PartialEq<CStr> for CStr
impl PartialEq<FromBytesUntilNulError> for FromBytesUntilNulError
impl PartialEq<FromBytesWithNulError> for FromBytesWithNulError
impl PartialEq<Ipv4Addr> for IpAddr
impl PartialEq<Ipv4Addr> for Ipv4Addr
impl PartialEq<Ipv4Addr> for ArchivedIpv4Addr
impl PartialEq<Ipv6Addr> for IpAddr
impl PartialEq<Ipv6Addr> for Ipv6Addr
impl PartialEq<Ipv6Addr> for ArchivedIpv6Addr
impl PartialEq<AddrParseError> for AddrParseError
impl PartialEq<SocketAddrV4> for SocketAddrV4
impl PartialEq<SocketAddrV4> for ArchivedSocketAddrV4
impl PartialEq<SocketAddrV6> for SocketAddrV6
impl PartialEq<SocketAddrV6> for ArchivedSocketAddrV6
impl PartialEq<ParseFloatError> for ParseFloatError
impl PartialEq<ParseIntError> for ParseIntError
impl PartialEq<TryFromIntError> for TryFromIntError
impl PartialEq<NonZeroI8> for NonZeroI8
impl PartialEq<NonZeroI16> for NonZeroI16
impl PartialEq<NonZeroI16> for BigEndian<NonZeroI16>
impl PartialEq<NonZeroI16> for LittleEndian<NonZeroI16>
impl PartialEq<NonZeroI16> for NativeEndian<NonZeroI16>
impl PartialEq<NonZeroI32> for NonZeroI32
impl PartialEq<NonZeroI32> for BigEndian<NonZeroI32>
impl PartialEq<NonZeroI32> for LittleEndian<NonZeroI32>
impl PartialEq<NonZeroI32> for NativeEndian<NonZeroI32>
impl PartialEq<NonZeroI64> for NonZeroI64
impl PartialEq<NonZeroI64> for BigEndian<NonZeroI64>
impl PartialEq<NonZeroI64> for LittleEndian<NonZeroI64>
impl PartialEq<NonZeroI64> for NativeEndian<NonZeroI64>
impl PartialEq<NonZeroI128> for NonZeroI128
impl PartialEq<NonZeroI128> for BigEndian<NonZeroI128>
impl PartialEq<NonZeroI128> for LittleEndian<NonZeroI128>
impl PartialEq<NonZeroI128> for NativeEndian<NonZeroI128>
impl PartialEq<NonZeroIsize> for NonZeroIsize
impl PartialEq<NonZeroU8> for NonZeroU8
impl PartialEq<NonZeroU16> for NonZeroU16
impl PartialEq<NonZeroU16> for BigEndian<NonZeroU16>
impl PartialEq<NonZeroU16> for LittleEndian<NonZeroU16>
impl PartialEq<NonZeroU16> for NativeEndian<NonZeroU16>
impl PartialEq<NonZeroU32> for NonZeroU32
impl PartialEq<NonZeroU32> for BigEndian<NonZeroU32>
impl PartialEq<NonZeroU32> for LittleEndian<NonZeroU32>
impl PartialEq<NonZeroU32> for NativeEndian<NonZeroU32>
impl PartialEq<NonZeroU64> for NonZeroU64
impl PartialEq<NonZeroU64> for BigEndian<NonZeroU64>
impl PartialEq<NonZeroU64> for LittleEndian<NonZeroU64>
impl PartialEq<NonZeroU64> for NativeEndian<NonZeroU64>
impl PartialEq<NonZeroU128> for NonZeroU128
impl PartialEq<NonZeroU128> for BigEndian<NonZeroU128>
impl PartialEq<NonZeroU128> for LittleEndian<NonZeroU128>
impl PartialEq<NonZeroU128> for NativeEndian<NonZeroU128>
impl PartialEq<NonZeroUsize> for NonZeroUsize
impl PartialEq<ParseBoolError> for ParseBoolError
impl PartialEq<Utf8Error> for core::str::error::Utf8Error
impl PartialEq<RawWaker> for RawWaker
impl PartialEq<RawWakerVTable> for RawWakerVTable
impl PartialEq<Duration> for Duration
impl PartialEq<Duration> for ArchivedDuration
impl PartialEq<TryFromFloatSecsError> for TryFromFloatSecsError
impl PartialEq<OsStr> for str
impl PartialEq<OsStr> for OsStr
impl PartialEq<OsStr> for Path
impl PartialEq<OsStr> for PathBuf
impl PartialEq<OsString> for str
impl PartialEq<OsString> for OsString
impl PartialEq<OsString> for Path
impl PartialEq<OsString> for PathBuf
impl PartialEq<FileType> for FileType
impl PartialEq<Permissions> for Permissions
impl PartialEq<UCred> for UCred
impl PartialEq<Path> for OsStr
impl PartialEq<Path> for OsString
impl PartialEq<Path> for Path
impl PartialEq<Path> for PathBuf
impl PartialEq<PathBuf> for OsStr
impl PartialEq<PathBuf> for OsString
impl PartialEq<PathBuf> for Path
impl PartialEq<PathBuf> for PathBuf
impl PartialEq<StripPrefixError> for StripPrefixError
impl PartialEq<ExitStatus> for ExitStatus
impl PartialEq<ExitStatusError> for ExitStatusError
impl PartialEq<Output> for Output
impl PartialEq<AccessError> for AccessError
impl PartialEq<ThreadId> for ThreadId
impl PartialEq<Instant> for Instant
impl PartialEq<SystemTime> for SystemTime
impl PartialEq<EnumSet<CpuFeature>> for CpuFeature
impl PartialEq<Error> for getrandom::error::Error
impl PartialEq<ArchivedCString> for &CStr
impl PartialEq<ArchivedCString> for CString
impl PartialEq<ArchivedCString> for ArchivedCString
impl PartialEq<ArchivedIpv4Addr> for Ipv4Addr
impl PartialEq<ArchivedIpv4Addr> for ArchivedIpv4Addr
impl PartialEq<ArchivedIpv6Addr> for Ipv6Addr
impl PartialEq<ArchivedIpv6Addr> for ArchivedIpv6Addr
impl PartialEq<ArchivedSocketAddrV4> for SocketAddrV4
impl PartialEq<ArchivedSocketAddrV4> for ArchivedSocketAddrV4
impl PartialEq<ArchivedSocketAddrV6> for SocketAddrV6
impl PartialEq<ArchivedSocketAddrV6> for ArchivedSocketAddrV6
impl PartialEq<ArchivedOptionNonZeroI8> for ArchivedOptionNonZeroI8
impl PartialEq<ArchivedOptionNonZeroI16> for ArchivedOptionNonZeroI16
impl PartialEq<ArchivedOptionNonZeroI32> for ArchivedOptionNonZeroI32
impl PartialEq<ArchivedOptionNonZeroI64> for ArchivedOptionNonZeroI64
impl PartialEq<ArchivedOptionNonZeroI128> for ArchivedOptionNonZeroI128
impl PartialEq<ArchivedOptionNonZeroU8> for ArchivedOptionNonZeroU8
impl PartialEq<ArchivedOptionNonZeroU16> for ArchivedOptionNonZeroU16
impl PartialEq<ArchivedOptionNonZeroU32> for ArchivedOptionNonZeroU32
impl PartialEq<ArchivedOptionNonZeroU64> for ArchivedOptionNonZeroU64
impl PartialEq<ArchivedOptionNonZeroU128> for ArchivedOptionNonZeroU128
impl PartialEq<ArchivedString> for &str
impl PartialEq<ArchivedString> for str
impl PartialEq<ArchivedString> for String
impl PartialEq<ArchivedString> for ArchivedString
impl PartialEq<ArchivedDuration> for Duration
impl PartialEq<ArchivedDuration> for ArchivedDuration
impl PartialEq<DefaultToHost> for DefaultToHost
impl PartialEq<DefaultToUnknown> for DefaultToUnknown
impl PartialEq<RawValue> for RawValue
impl PartialEq<BigEndian<char>> for char
impl PartialEq<BigEndian<char>> for BigEndian<char>
impl PartialEq<BigEndian<f32>> for f32
impl PartialEq<BigEndian<f32>> for BigEndian<f32>
impl PartialEq<BigEndian<f64>> for f64
impl PartialEq<BigEndian<f64>> for BigEndian<f64>
impl PartialEq<BigEndian<i16>> for i16
impl PartialEq<BigEndian<i16>> for BigEndian<i16>
impl PartialEq<BigEndian<i32>> for i32
impl PartialEq<BigEndian<i32>> for BigEndian<i32>
impl PartialEq<BigEndian<i64>> for i64
impl PartialEq<BigEndian<i64>> for BigEndian<i64>
impl PartialEq<BigEndian<i128>> for i128
impl PartialEq<BigEndian<i128>> for BigEndian<i128>
impl PartialEq<BigEndian<u16>> for u16
impl PartialEq<BigEndian<u16>> for BigEndian<u16>
impl PartialEq<BigEndian<u32>> for u32
impl PartialEq<BigEndian<u32>> for BigEndian<u32>
impl PartialEq<BigEndian<u64>> for u64
impl PartialEq<BigEndian<u64>> for BigEndian<u64>
impl PartialEq<BigEndian<u128>> for u128
impl PartialEq<BigEndian<u128>> for BigEndian<u128>
impl PartialEq<BigEndian<NonZeroI16>> for NonZeroI16
impl PartialEq<BigEndian<NonZeroI16>> for BigEndian<NonZeroI16>
impl PartialEq<BigEndian<NonZeroI32>> for NonZeroI32
impl PartialEq<BigEndian<NonZeroI32>> for BigEndian<NonZeroI32>
impl PartialEq<BigEndian<NonZeroI64>> for NonZeroI64
impl PartialEq<BigEndian<NonZeroI64>> for BigEndian<NonZeroI64>
impl PartialEq<BigEndian<NonZeroI128>> for NonZeroI128
impl PartialEq<BigEndian<NonZeroI128>> for BigEndian<NonZeroI128>
impl PartialEq<BigEndian<NonZeroU16>> for NonZeroU16
impl PartialEq<BigEndian<NonZeroU16>> for BigEndian<NonZeroU16>
impl PartialEq<BigEndian<NonZeroU32>> for NonZeroU32
impl PartialEq<BigEndian<NonZeroU32>> for BigEndian<NonZeroU32>
impl PartialEq<BigEndian<NonZeroU64>> for NonZeroU64
impl PartialEq<BigEndian<NonZeroU64>> for BigEndian<NonZeroU64>
impl PartialEq<BigEndian<NonZeroU128>> for NonZeroU128
impl PartialEq<BigEndian<NonZeroU128>> for BigEndian<NonZeroU128>
impl PartialEq<LittleEndian<char>> for char
impl PartialEq<LittleEndian<char>> for LittleEndian<char>
impl PartialEq<LittleEndian<f32>> for f32
impl PartialEq<LittleEndian<f32>> for LittleEndian<f32>
impl PartialEq<LittleEndian<f64>> for f64
impl PartialEq<LittleEndian<f64>> for LittleEndian<f64>
impl PartialEq<LittleEndian<i16>> for i16
impl PartialEq<LittleEndian<i16>> for LittleEndian<i16>
impl PartialEq<LittleEndian<i32>> for i32
impl PartialEq<LittleEndian<i32>> for LittleEndian<i32>
impl PartialEq<LittleEndian<i64>> for i64
impl PartialEq<LittleEndian<i64>> for LittleEndian<i64>
impl PartialEq<LittleEndian<i128>> for i128
impl PartialEq<LittleEndian<i128>> for LittleEndian<i128>
impl PartialEq<LittleEndian<u16>> for u16
impl PartialEq<LittleEndian<u16>> for LittleEndian<u16>
impl PartialEq<LittleEndian<u32>> for u32
impl PartialEq<LittleEndian<u32>> for LittleEndian<u32>
impl PartialEq<LittleEndian<u64>> for u64
impl PartialEq<LittleEndian<u64>> for LittleEndian<u64>
impl PartialEq<LittleEndian<u128>> for u128
impl PartialEq<LittleEndian<u128>> for LittleEndian<u128>
impl PartialEq<LittleEndian<NonZeroI16>> for NonZeroI16
impl PartialEq<LittleEndian<NonZeroI16>> for LittleEndian<NonZeroI16>
impl PartialEq<LittleEndian<NonZeroI32>> for NonZeroI32
impl PartialEq<LittleEndian<NonZeroI32>> for LittleEndian<NonZeroI32>
impl PartialEq<LittleEndian<NonZeroI64>> for NonZeroI64
impl PartialEq<LittleEndian<NonZeroI64>> for LittleEndian<NonZeroI64>
impl PartialEq<LittleEndian<NonZeroI128>> for NonZeroI128
impl PartialEq<LittleEndian<NonZeroI128>> for LittleEndian<NonZeroI128>
impl PartialEq<LittleEndian<NonZeroU16>> for NonZeroU16
impl PartialEq<LittleEndian<NonZeroU16>> for LittleEndian<NonZeroU16>
impl PartialEq<LittleEndian<NonZeroU32>> for NonZeroU32
impl PartialEq<LittleEndian<NonZeroU32>> for LittleEndian<NonZeroU32>
impl PartialEq<LittleEndian<NonZeroU64>> for NonZeroU64
impl PartialEq<LittleEndian<NonZeroU64>> for LittleEndian<NonZeroU64>
impl PartialEq<LittleEndian<NonZeroU128>> for NonZeroU128
impl PartialEq<LittleEndian<NonZeroU128>> for LittleEndian<NonZeroU128>
impl PartialEq<NativeEndian<char>> for char
impl PartialEq<NativeEndian<char>> for NativeEndian<char>
impl PartialEq<NativeEndian<f32>> for f32
impl PartialEq<NativeEndian<f32>> for NativeEndian<f32>
impl PartialEq<NativeEndian<f64>> for f64
impl PartialEq<NativeEndian<f64>> for NativeEndian<f64>
impl PartialEq<NativeEndian<i16>> for i16
impl PartialEq<NativeEndian<i16>> for NativeEndian<i16>
impl PartialEq<NativeEndian<i32>> for i32
impl PartialEq<NativeEndian<i32>> for NativeEndian<i32>
impl PartialEq<NativeEndian<i64>> for i64
impl PartialEq<NativeEndian<i64>> for NativeEndian<i64>
impl PartialEq<NativeEndian<i128>> for i128
impl PartialEq<NativeEndian<i128>> for NativeEndian<i128>
impl PartialEq<NativeEndian<u16>> for u16
impl PartialEq<NativeEndian<u16>> for NativeEndian<u16>
impl PartialEq<NativeEndian<u32>> for u32
impl PartialEq<NativeEndian<u32>> for NativeEndian<u32>
impl PartialEq<NativeEndian<u64>> for u64
impl PartialEq<NativeEndian<u64>> for NativeEndian<u64>
impl PartialEq<NativeEndian<u128>> for u128
impl PartialEq<NativeEndian<u128>> for NativeEndian<u128>
impl PartialEq<NativeEndian<NonZeroI16>> for NonZeroI16
impl PartialEq<NativeEndian<NonZeroI16>> for NativeEndian<NonZeroI16>
impl PartialEq<NativeEndian<NonZeroI32>> for NonZeroI32
impl PartialEq<NativeEndian<NonZeroI32>> for NativeEndian<NonZeroI32>
impl PartialEq<NativeEndian<NonZeroI64>> for NonZeroI64
impl PartialEq<NativeEndian<NonZeroI64>> for NativeEndian<NonZeroI64>
impl PartialEq<NativeEndian<NonZeroI128>> for NonZeroI128
impl PartialEq<NativeEndian<NonZeroI128>> for NativeEndian<NonZeroI128>
impl PartialEq<NativeEndian<NonZeroU16>> for NonZeroU16
impl PartialEq<NativeEndian<NonZeroU16>> for NativeEndian<NonZeroU16>
impl PartialEq<NativeEndian<NonZeroU32>> for NonZeroU32
impl PartialEq<NativeEndian<NonZeroU32>> for NativeEndian<NonZeroU32>
impl PartialEq<NativeEndian<NonZeroU64>> for NonZeroU64
impl PartialEq<NativeEndian<NonZeroU64>> for NativeEndian<NonZeroU64>
impl PartialEq<NativeEndian<NonZeroU128>> for NonZeroU128
impl PartialEq<NativeEndian<NonZeroU128>> for NativeEndian<NonZeroU128>
impl PartialEq<TryReserveError> for TryReserveError
impl PartialEq<Utf8Error> for Utf8Error
impl PartialEq<Utf8Error> for Utf8Error
impl<'a> PartialEq<&'a OsStr> for Path
impl<'a> PartialEq<&'a OsStr> for PathBuf
impl<'a> PartialEq<&'a Path> for OsStr
impl<'a> PartialEq<&'a Path> for OsString
impl<'a> PartialEq<&'a Path> for PathBuf
impl<'a> PartialEq<Cow<'a, OsStr>> for Path
impl<'a> PartialEq<Cow<'a, OsStr>> for PathBuf
impl<'a> PartialEq<Cow<'a, Path>> for OsStr
impl<'a> PartialEq<Cow<'a, Path>> for OsString
impl<'a> PartialEq<Cow<'a, Path>> for Path
impl<'a> PartialEq<Cow<'a, Path>> for PathBuf
impl<'a> PartialEq<Component<'a>> for Component<'a>
impl<'a> PartialEq<Prefix<'a>> for Prefix<'a>
impl<'a> PartialEq<Location<'a>> for Location<'a>
impl<'a> PartialEq<Utf8Chunk<'a>> for Utf8Chunk<'a>
impl<'a> PartialEq<OsStr> for &'a Path
impl<'a> PartialEq<OsStr> for Cow<'a, Path>
impl<'a> PartialEq<OsString> for &'a str
impl<'a> PartialEq<OsString> for &'a Path
impl<'a> PartialEq<OsString> for Cow<'a, Path>
impl<'a> PartialEq<Components<'a>> for Components<'a>
impl<'a> PartialEq<Path> for &'a OsStr
impl<'a> PartialEq<Path> for Cow<'a, OsStr>
impl<'a> PartialEq<Path> for Cow<'a, Path>
impl<'a> PartialEq<PathBuf> for &'a OsStr
impl<'a> PartialEq<PathBuf> for &'a Path
impl<'a> PartialEq<PathBuf> for Cow<'a, OsStr>
impl<'a> PartialEq<PathBuf> for Cow<'a, Path>
impl<'a> PartialEq<PrefixComponent<'a>> for PrefixComponent<'a>
impl<'a, 'b> PartialEq<&'a str> for String
impl<'a, 'b> PartialEq<&'a OsStr> for OsString
impl<'a, 'b> PartialEq<&'a Path> for Cow<'b, OsStr>
impl<'a, 'b> PartialEq<&'b str> for Cow<'a, str>
impl<'a, 'b> PartialEq<&'b OsStr> for Cow<'a, OsStr>
impl<'a, 'b> PartialEq<&'b OsStr> for Cow<'a, Path>
impl<'a, 'b> PartialEq<&'b Path> for Cow<'a, Path>
impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str
impl<'a, 'b> PartialEq<Cow<'a, str>> for str
impl<'a, 'b> PartialEq<Cow<'a, str>> for String
impl<'a, 'b> PartialEq<Cow<'a, OsStr>> for &'b OsStr
impl<'a, 'b> PartialEq<Cow<'a, OsStr>> for OsStr
impl<'a, 'b> PartialEq<Cow<'a, OsStr>> for OsString
impl<'a, 'b> PartialEq<Cow<'a, Path>> for &'b OsStr
impl<'a, 'b> PartialEq<Cow<'a, Path>> for &'b Path
impl<'a, 'b> PartialEq<Cow<'b, OsStr>> for &'a Path
impl<'a, 'b> PartialEq<str> for Cow<'a, str>
impl<'a, 'b> PartialEq<str> for String
impl<'a, 'b> PartialEq<String> for &'a str
impl<'a, 'b> PartialEq<String> for Cow<'a, str>
impl<'a, 'b> PartialEq<String> for str
impl<'a, 'b> PartialEq<OsStr> for Cow<'a, OsStr>
impl<'a, 'b> PartialEq<OsStr> for OsString
impl<'a, 'b> PartialEq<OsString> for &'a OsStr
impl<'a, 'b> PartialEq<OsString> for Cow<'a, OsStr>
impl<'a, 'b> PartialEq<OsString> for OsStr
impl<'a, 'b, B, C> PartialEq<Cow<'b, C>> for Cow<'a, B>where B: PartialEq<C> + ToOwned + ?Sized, C: ToOwned + ?Sized,
impl<A, B> PartialEq<&B> for &Awhere A: PartialEq<B> + ?Sized, B: ?Sized,
impl<A, B> PartialEq<&B> for &mut Awhere A: PartialEq<B> + ?Sized, B: ?Sized,
impl<A, B> PartialEq<&mut B> for &Awhere A: PartialEq<B> + ?Sized, B: ?Sized,
impl<A, B> PartialEq<&mut B> for &mut Awhere A: PartialEq<B> + ?Sized, B: ?Sized,
impl<A, B> PartialEq<[B]> for [A]where A: PartialEq<B>,
impl<A, B, const N: usize> PartialEq<&[B]> for [A; N]where A: PartialEq<B>,
impl<A, B, const N: usize> PartialEq<&mut [B]> for [A; N]where A: PartialEq<B>,
impl<A, B, const N: usize> PartialEq<[A; N]> for &[B]where B: PartialEq<A>,
impl<A, B, const N: usize> PartialEq<[A; N]> for &mut [B]where B: PartialEq<A>,
impl<A, B, const N: usize> PartialEq<[A; N]> for [B]where B: PartialEq<A>,
impl<A, B, const N: usize> PartialEq<[B; N]> for [A; N]where A: PartialEq<B>,
impl<A, B, const N: usize> PartialEq<[B]> for [A; N]where A: PartialEq<B>,
impl<B, C> PartialEq<ControlFlow<B, C>> for ControlFlow<B, C>where B: PartialEq<B>, C: PartialEq<C>,
impl<Dyn> PartialEq<DynMetadata<Dyn>> for wasmer_types::lib::std::ptr::DynMetadata<Dyn>where Dyn: ?Sized,
impl<Dyn> PartialEq<DynMetadata<Dyn>> for DynMetadata<Dyn>where Dyn: ?Sized,
impl<F> PartialEq<F> for Fwhere F: FnPtr,
impl<H> PartialEq<BuildHasherDefault<H>> for BuildHasherDefault<H>
impl<Idx> PartialEq<Range<Idx>> for Range<Idx>where Idx: PartialEq<Idx>,
impl<Idx> PartialEq<RangeFrom<Idx>> for RangeFrom<Idx>where Idx: PartialEq<Idx>,
impl<Idx> PartialEq<RangeInclusive<Idx>> for RangeInclusive<Idx>where Idx: PartialEq<Idx>,
impl<Idx> PartialEq<RangeTo<Idx>> for RangeTo<Idx>where Idx: PartialEq<Idx>,
impl<Idx> PartialEq<RangeToInclusive<Idx>> for RangeToInclusive<Idx>where Idx: PartialEq<Idx>,
impl<K> PartialEq<ArchivedBTreeSet<K>> for ArchivedBTreeSet<K>where K: PartialEq<K>,
impl<K> PartialEq<ArchivedHashSet<K>> for ArchivedHashSet<K>where K: Hash + Eq,
impl<K> PartialEq<ArchivedIndexSet<K>> for ArchivedIndexSet<K>where K: PartialEq<K>,
impl<K, AK> PartialEq<BTreeSet<K, Global>> for ArchivedBTreeSet<AK>where AK: PartialEq<K>,
impl<K, AK> PartialEq<ArchivedBTreeSet<AK>> for BTreeSet<K, Global>where AK: PartialEq<K>,
impl<K, AK, S> PartialEq<HashSet<K, S>> for ArchivedHashSet<AK>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher,
impl<K, AK, S> PartialEq<ArchivedHashSet<AK>> for std::collections::hash::set::HashSet<K, S>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher,
impl<K, AK, S> PartialEq<ArchivedHashSet<AK>> for HashSet<K, S, Global>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher,
impl<K, AK, S> PartialEq<HashSet<K, S, Global>> for ArchivedHashSet<AK>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, S: BuildHasher,
impl<K, V1, S1, V2, S2> PartialEq<IndexMap<K, V2, S2>> for IndexMap<K, V1, S1>where K: Hash + Eq, V1: PartialEq<V2>, S1: BuildHasher, S2: BuildHasher,
impl<K, V> PartialEq<SecondaryMap<K, V>> for SecondaryMap<K, V>where K: EntityRef, V: Clone + PartialEq,
impl<K, V> PartialEq<ArchivedBTreeMap<K, V>> for ArchivedBTreeMap<K, V>where K: PartialEq<K>, V: PartialEq<V>,
impl<K, V> PartialEq<ArchivedHashMap<K, V>> for ArchivedHashMap<K, V>where K: Hash + Eq, V: PartialEq<V>,
impl<K, V> PartialEq<ArchivedIndexMap<K, V>> for ArchivedIndexMap<K, V>where K: PartialEq<K>, V: PartialEq<V>,
impl<K, V, A> PartialEq<BTreeMap<K, V, A>> for BTreeMap<K, V, A>where K: PartialEq<K>, V: PartialEq<V>, A: Allocator + Clone,
impl<K, V, AK, AV> PartialEq<BTreeMap<K, V, Global>> for ArchivedBTreeMap<AK, AV>where AK: PartialEq<K>, AV: PartialEq<V>,
impl<K, V, AK, AV> PartialEq<ArchivedBTreeMap<AK, AV>> for BTreeMap<K, V, Global>where AK: PartialEq<K>, AV: PartialEq<V>,
impl<K, V, AK, AV> PartialEq<ArchivedHashMap<AK, AV>> for std::collections::hash::map::HashMap<K, V, RandomState>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, AV: PartialEq<V>,
impl<K, V, AK, AV> PartialEq<ArchivedHashMap<AK, AV>> for HashMap<K, V, RandomState, Global>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, AV: PartialEq<V>,
impl<K, V, AK, AV, S> PartialEq<HashMap<K, V, S>> for ArchivedHashMap<AK, AV>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, AV: PartialEq<V>, S: BuildHasher,
impl<K, V, AK, AV, S> PartialEq<HashMap<K, V, S, Global>> for ArchivedHashMap<AK, AV>where K: Hash + Eq + Borrow<AK>, AK: Hash + Eq, AV: PartialEq<V>, S: BuildHasher,
impl<K, V, S> PartialEq<HashMap<K, V, S>> for std::collections::hash::map::HashMap<K, V, S>where K: Eq + Hash, V: PartialEq<V>, S: BuildHasher,
impl<K, V, S, A> PartialEq<HashMap<K, V, S, A>> for HashMap<K, V, S, A>where K: Eq + Hash, V: PartialEq<V>, S: BuildHasher, A: Allocator + Clone,
impl<K, V, UK, UV> PartialEq<Entry<UK, UV>> for Entry<K, V>where K: PartialEq<UK>, V: PartialEq<UV>,
impl<K, V: PartialEq> PartialEq<PrimaryMap<K, V>> for PrimaryMap<K, V>where K: EntityRef + PartialEq,
impl<P, Q> PartialEq<Pin<Q>> for Pin<P>where P: Deref, Q: Deref, <P as Deref>::Target: PartialEq<<Q as Deref>::Target>,
impl<T> PartialEq<Bound<T>> for Bound<T>where T: PartialEq<T>,
impl<T> PartialEq<TrySendError<T>> for TrySendError<T>where T: PartialEq<T>,
impl<T> PartialEq<Option<T>> for Option<T>where T: PartialEq<T>,
impl<T> PartialEq<Poll<T>> for Poll<T>where T: PartialEq<T>,
impl<T> PartialEq<ArchivedOption<T>> for ArchivedOption<T>where T: PartialEq<T>,
impl<T> PartialEq<*const T> for *const Twhere T: ?Sized,
impl<T> PartialEq<*mut T> for *mut Twhere T: ?Sized,
impl<T> PartialEq<(T,)> for (T₁, T₂, …, Tₙ)where T: PartialEq<T> + ?Sized,
This trait is implemented for tuples up to twelve items long.