pub trait PartialEq<Rhs = Self>where
Rhs: ?Sized,{
// Required method
fn eq(&self, other: &Rhs) -> bool;
// Provided method
fn ne(&self, other: &Rhs) -> bool { ... }
}
std
only.Expand description
Trait for comparisons using the equality operator.
Implementing this trait for types provides the ==
and !=
operators for
those types.
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 comparisons using the equality operator, 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
):
-
Symmetry: if
A: PartialEq<B>
andB: PartialEq<A>
, thena == b
impliesb == a
; and -
Transitivity: if
A: PartialEq<B>
andB: PartialEq<C>
andA: PartialEq<C>
, thena == b
andb == c
impliesa == c
. This must also work for longer chains, such as whenA: PartialEq<B>
,B: PartialEq<C>
,C: PartialEq<D>
, andA: PartialEq<D>
all exist.
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.
Violating these requirements is a logic error. The behavior resulting from a logic error is not
specified, but users of the trait must ensure that such logic errors do not result in
undefined behavior. This means that unsafe
code must not rely on the correctness of these
methods.
§Cross-crate considerations
Upholding the requirements stated above can become tricky when one crate implements PartialEq
for a type of another crate (i.e., to allow comparing one of its own types with a type from the
standard library). The recommendation is to never implement this trait for a foreign type. In
other words, such a crate should do impl PartialEq<ForeignType> for LocalType
, but it should
not do impl PartialEq<LocalType> for ForeignType
.
This avoids the problem of transitive chains that criss-cross crate boundaries: for all local
types T
, you may assume that no other crate will add impl
s that allow comparing T == U
. In
other words, if other crates add impl
s that allow building longer transitive chains U1 == ... == T == V1 == ...
, then all the types that appear to the right of T
must be types that the
crate defining T
already knows about. This rules out transitive chains where downstream crates
can add new impl
s that “stitch together” comparisons of foreign types in ways that violate
transitivity.
Not having such foreign impl
s also avoids forward compatibility issues where one crate adding
more PartialEq
implementations can cause build failures in downstream crates.
§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 for RelocationKind
impl PartialEq for RelocationTarget
impl PartialEq for CustomSectionProtection
impl PartialEq for Symbol
impl PartialEq for CpuFeature
impl PartialEq for CompiledFunctionUnwindInfo
impl PartialEq for Aarch64Architecture
impl PartialEq for Architecture
impl PartialEq for BinaryFormat
impl PartialEq for CallingConvention
impl PartialEq for Endianness
impl PartialEq for Environment
impl PartialEq for ExportIndex
impl PartialEq for ExternType
impl PartialEq for GlobalInit
impl PartialEq for HashAlgorithm
impl PartialEq for ImportIndex
impl PartialEq for LibCall
impl PartialEq for MemoryStyle
impl PartialEq for ModuleHash
impl PartialEq for Mutability
impl PartialEq for OperatingSystem
impl PartialEq for PointerWidth
impl PartialEq for TableStyle
impl PartialEq for TrapCode
impl PartialEq for Type
impl PartialEq for Vendor
impl PartialEq for MemoryError
impl PartialEq for Infallible
impl PartialEq for wasmer_types::lib::std::fmt::Alignment
impl PartialEq for wasmer_types::lib::std::sync::atomic::Ordering
impl PartialEq for RecvTimeoutError
impl PartialEq for TryRecvError
impl PartialEq for wasmer_types::lib::std::cmp::Ordering
impl PartialEq for TryReserveErrorKind
impl PartialEq for AsciiChar
impl PartialEq for IpAddr
impl PartialEq for Ipv6MulticastScope
impl PartialEq for SocketAddr
impl PartialEq for FpCategory
impl PartialEq for IntErrorKind
impl PartialEq for SearchStep
impl PartialEq for BacktraceStatus
impl PartialEq for VarError
impl PartialEq for SeekFrom
impl PartialEq for ErrorKind
impl PartialEq for Shutdown
impl PartialEq for BacktraceStyle
impl PartialEq for _Unwind_Action
impl PartialEq for _Unwind_Reason_Code
impl PartialEq for hashbrown::TryReserveError
impl PartialEq for FromHexError
impl PartialEq for ArchivedIpAddr
impl PartialEq for ArchivedSocketAddr
impl PartialEq for OffsetError
impl PartialEq for CDataModel
impl PartialEq for Size
impl PartialEq for ParseError
impl PartialEq for ArmArchitecture
impl PartialEq for CustomVendor
impl PartialEq for Mips32Architecture
impl PartialEq for Mips64Architecture
impl PartialEq for Riscv32Architecture
impl PartialEq for Riscv64Architecture
impl PartialEq for X86_32Architecture
impl PartialEq for bool
impl PartialEq for char
impl PartialEq for f16
impl PartialEq for f32
impl PartialEq for f64
impl PartialEq for f128
impl PartialEq for i8
impl PartialEq for i16
impl PartialEq for i32
impl PartialEq for i64
impl PartialEq for i128
impl PartialEq for isize
impl PartialEq for !
impl PartialEq for str
impl PartialEq for u8
impl PartialEq for u16
impl PartialEq for u32
impl PartialEq for u64
impl PartialEq for u128
impl PartialEq for ()
impl PartialEq for usize
impl PartialEq for FunctionAddressMap
impl PartialEq for InstructionAddressMap
impl PartialEq for Compilation
impl PartialEq for CompiledFunction
impl PartialEq for CompiledFunctionFrameInfo
impl PartialEq for Dwarf
impl PartialEq for FunctionBody
impl PartialEq for CompileModuleInfo
impl PartialEq for Relocation
impl PartialEq for CustomSection
impl PartialEq for SectionBody
impl PartialEq for SectionIndex
impl PartialEq for Target
impl PartialEq for Bytes
impl PartialEq for CustomSectionIndex
impl PartialEq for DataIndex
impl PartialEq for DataInitializerLocation
impl PartialEq for ElemIndex
impl PartialEq for Features
impl PartialEq for FunctionIndex
impl PartialEq for FunctionType
impl PartialEq for GlobalIndex
impl PartialEq for GlobalType
impl PartialEq for ImportKey
impl PartialEq for LocalFunctionIndex
impl PartialEq for LocalGlobalIndex
impl PartialEq for LocalMemoryIndex
impl PartialEq for LocalTableIndex
impl PartialEq for MemoryIndex
impl PartialEq for MemoryType
impl PartialEq for ModuleInfo
impl PartialEq for OwnedDataInitializer
impl PartialEq for PageCountOutOfRange
impl PartialEq for Pages
impl PartialEq for SignatureIndex
impl PartialEq for SourceLoc
impl PartialEq for StoreId
impl PartialEq for TableIndex
impl PartialEq for TableInitializer
impl PartialEq for TableType
impl PartialEq for TrapInformation
impl PartialEq for Triple
impl PartialEq for V128
impl PartialEq for TypeId
impl PartialEq for wasmer_types::lib::std::fmt::Error
impl PartialEq for PhantomPinned
impl PartialEq for Assume
impl PartialEq for RangeFull
impl PartialEq for wasmer_types::lib::std::ptr::Alignment
impl PartialEq for FromUtf8Error
impl PartialEq for String
impl PartialEq for RecvError
impl PartialEq for WaitTimeoutResult
impl PartialEq for UnorderedKeyError
impl PartialEq for alloc::collections::TryReserveError
impl PartialEq for CString
impl PartialEq for FromVecWithNulError
impl PartialEq for IntoStringError
impl PartialEq for NulError
impl PartialEq for Layout
impl PartialEq for LayoutError
impl PartialEq for AllocError
impl PartialEq for CharTryFromError
impl PartialEq for ParseCharError
impl PartialEq for DecodeUtf16Error
impl PartialEq for TryFromCharError
impl PartialEq for CpuidResult
impl PartialEq for CStr
impl PartialEq for FromBytesUntilNulError
impl PartialEq for FromBytesWithNulError
impl PartialEq for Ipv4Addr
impl PartialEq for Ipv6Addr
impl PartialEq for AddrParseError
impl PartialEq for SocketAddrV4
impl PartialEq for SocketAddrV6
impl PartialEq for ParseFloatError
impl PartialEq for ParseIntError
impl PartialEq for TryFromIntError
impl PartialEq for ParseBoolError
impl PartialEq for core::str::error::Utf8Error
impl PartialEq for RawWaker
impl PartialEq for RawWakerVTable
impl PartialEq for Duration
impl PartialEq for TryFromFloatSecsError
impl PartialEq for OsStr
impl PartialEq for OsString
impl PartialEq for FileType
impl PartialEq for Permissions
impl PartialEq for UCred
impl PartialEq for Path
impl PartialEq for PathBuf
impl PartialEq for StripPrefixError
impl PartialEq for ExitStatus
impl PartialEq for ExitStatusError
impl PartialEq for Output
impl PartialEq for AccessError
impl PartialEq for ThreadId
impl PartialEq for Instant
impl PartialEq for SystemTime
impl PartialEq for block_buffer::Error
impl PartialEq for InvalidLength
impl PartialEq for InvalidBufferSize
impl PartialEq for getrandom::error::Error
impl PartialEq for BigEndian<char>
impl PartialEq for BigEndian<f32>
impl PartialEq for BigEndian<f64>
impl PartialEq for BigEndian<i16>
impl PartialEq for BigEndian<i32>
impl PartialEq for BigEndian<i64>
impl PartialEq for BigEndian<i128>
impl PartialEq for BigEndian<u16>
impl PartialEq for BigEndian<u32>
impl PartialEq for BigEndian<u64>
impl PartialEq for BigEndian<u128>
impl PartialEq for BigEndian<NonZero<i16>>
impl PartialEq for BigEndian<NonZero<i32>>
impl PartialEq for BigEndian<NonZero<i64>>
impl PartialEq for BigEndian<NonZero<i128>>
impl PartialEq for BigEndian<NonZero<u16>>
impl PartialEq for BigEndian<NonZero<u32>>
impl PartialEq for BigEndian<NonZero<u64>>
impl PartialEq for BigEndian<NonZero<u128>>
impl PartialEq for LittleEndian<char>
impl PartialEq for LittleEndian<f32>
impl PartialEq for LittleEndian<f64>
impl PartialEq for LittleEndian<i16>
impl PartialEq for LittleEndian<i32>
impl PartialEq for LittleEndian<i64>
impl PartialEq for LittleEndian<i128>
impl PartialEq for LittleEndian<u16>
impl PartialEq for LittleEndian<u32>
impl PartialEq for LittleEndian<u64>
impl PartialEq for LittleEndian<u128>
impl PartialEq for LittleEndian<NonZero<i16>>
impl PartialEq for LittleEndian<NonZero<i32>>
impl PartialEq for LittleEndian<NonZero<i64>>
impl PartialEq for LittleEndian<NonZero<i128>>
impl PartialEq for LittleEndian<NonZero<u16>>
impl PartialEq for LittleEndian<NonZero<u32>>
impl PartialEq for LittleEndian<NonZero<u64>>
impl PartialEq for LittleEndian<NonZero<u128>>
impl PartialEq for NativeEndian<char>
impl PartialEq for NativeEndian<f32>
impl PartialEq for NativeEndian<f64>
impl PartialEq for NativeEndian<i16>
impl PartialEq for NativeEndian<i32>
impl PartialEq for NativeEndian<i64>
impl PartialEq for NativeEndian<i128>
impl PartialEq for NativeEndian<u16>
impl PartialEq for NativeEndian<u32>
impl PartialEq for NativeEndian<u64>
impl PartialEq for NativeEndian<u128>
impl PartialEq for NativeEndian<NonZero<i16>>
impl PartialEq for NativeEndian<NonZero<i32>>
impl PartialEq for NativeEndian<NonZero<i64>>
impl PartialEq for NativeEndian<NonZero<i128>>
impl PartialEq for NativeEndian<NonZero<u16>>
impl PartialEq for NativeEndian<NonZero<u32>>
impl PartialEq for NativeEndian<NonZero<u64>>
impl PartialEq for NativeEndian<NonZero<u128>>
impl PartialEq for ArchivedCString
impl PartialEq for ArchivedIpv4Addr
impl PartialEq for ArchivedIpv6Addr
impl PartialEq for ArchivedSocketAddrV4
impl PartialEq for ArchivedSocketAddrV6
impl PartialEq for ArchivedOptionNonZeroI8
impl PartialEq for ArchivedOptionNonZeroI16
impl PartialEq for ArchivedOptionNonZeroI32
impl PartialEq for ArchivedOptionNonZeroI64
impl PartialEq for ArchivedOptionNonZeroI128
impl PartialEq for ArchivedOptionNonZeroU8
impl PartialEq for ArchivedOptionNonZeroU16
impl PartialEq for ArchivedOptionNonZeroU32
impl PartialEq for ArchivedOptionNonZeroU64
impl PartialEq for ArchivedOptionNonZeroU128
impl PartialEq for ArchivedString
impl PartialEq for ArchivedDuration
impl PartialEq for simdutf8::basic::Utf8Error
impl PartialEq for simdutf8::compat::Utf8Error
impl PartialEq for DefaultToHost
impl PartialEq for DefaultToUnknown
impl PartialEq for ATerm
impl PartialEq for B0
impl PartialEq for B1
impl PartialEq for Z0
impl PartialEq for Equal
impl PartialEq for Greater
impl PartialEq for Less
impl PartialEq for UTerm
impl PartialEq for RawValue
impl PartialEq<&str> for OsString
impl PartialEq<&str> for ArchivedString
impl PartialEq<&CStr> for ArchivedCString
impl PartialEq<IpAddr> for ArchivedIpAddr
impl PartialEq<IpAddr> for Ipv4Addr
impl PartialEq<IpAddr> for Ipv6Addr
impl PartialEq<SocketAddr> for ArchivedSocketAddr
impl PartialEq<ArchivedIpAddr> for IpAddr
impl PartialEq<ArchivedSocketAddr> for SocketAddr
impl PartialEq<char> for BigEndian<char>
impl PartialEq<char> for LittleEndian<char>
impl PartialEq<char> for NativeEndian<char>
impl PartialEq<f32> for BigEndian<f32>
impl PartialEq<f32> for LittleEndian<f32>
impl PartialEq<f32> for NativeEndian<f32>
impl PartialEq<f32> for RawValue
impl PartialEq<f64> for BigEndian<f64>
impl PartialEq<f64> for LittleEndian<f64>
impl PartialEq<f64> for NativeEndian<f64>
impl PartialEq<f64> for RawValue
impl PartialEq<i16> for BigEndian<i16>
impl PartialEq<i16> for LittleEndian<i16>
impl PartialEq<i16> for NativeEndian<i16>
impl PartialEq<i32> for BigEndian<i32>
impl PartialEq<i32> for LittleEndian<i32>
impl PartialEq<i32> for NativeEndian<i32>
impl PartialEq<i32> for RawValue
impl PartialEq<i64> for BigEndian<i64>
impl PartialEq<i64> for LittleEndian<i64>
impl PartialEq<i64> for NativeEndian<i64>
impl PartialEq<i64> for RawValue
impl PartialEq<i128> for BigEndian<i128>
impl PartialEq<i128> for LittleEndian<i128>
impl PartialEq<i128> for NativeEndian<i128>
impl PartialEq<i128> for RawValue
impl PartialEq<str> for OsStr
impl PartialEq<str> for OsString
impl PartialEq<str> for ArchivedString
impl PartialEq<u16> for BigEndian<u16>
impl PartialEq<u16> for LittleEndian<u16>
impl PartialEq<u16> for NativeEndian<u16>
impl PartialEq<u32> for BigEndian<u32>
impl PartialEq<u32> for LittleEndian<u32>
impl PartialEq<u32> for NativeEndian<u32>
impl PartialEq<u32> for RawValue
impl PartialEq<u64> for BigEndian<u64>
impl PartialEq<u64> for LittleEndian<u64>
impl PartialEq<u64> for NativeEndian<u64>
impl PartialEq<u64> for RawValue
impl PartialEq<u128> for BigEndian<u128>
impl PartialEq<u128> for LittleEndian<u128>
impl PartialEq<u128> for NativeEndian<u128>
impl PartialEq<u128> for RawValue
impl PartialEq<String> for ArchivedString
impl PartialEq<CString> for ArchivedCString
impl PartialEq<Ipv4Addr> for IpAddr
impl PartialEq<Ipv4Addr> for ArchivedIpv4Addr
impl PartialEq<Ipv6Addr> for IpAddr
impl PartialEq<Ipv6Addr> for ArchivedIpv6Addr
impl PartialEq<SocketAddrV4> for ArchivedSocketAddrV4
impl PartialEq<SocketAddrV6> for ArchivedSocketAddrV6
impl PartialEq<NonZero<i16>> for BigEndian<NonZero<i16>>
impl PartialEq<NonZero<i16>> for LittleEndian<NonZero<i16>>
impl PartialEq<NonZero<i16>> for NativeEndian<NonZero<i16>>
impl PartialEq<NonZero<i32>> for BigEndian<NonZero<i32>>
impl PartialEq<NonZero<i32>> for LittleEndian<NonZero<i32>>
impl PartialEq<NonZero<i32>> for NativeEndian<NonZero<i32>>
impl PartialEq<NonZero<i64>> for BigEndian<NonZero<i64>>
impl PartialEq<NonZero<i64>> for LittleEndian<NonZero<i64>>
impl PartialEq<NonZero<i64>> for NativeEndian<NonZero<i64>>
impl PartialEq<NonZero<i128>> for BigEndian<NonZero<i128>>
impl PartialEq<NonZero<i128>> for LittleEndian<NonZero<i128>>
impl PartialEq<NonZero<i128>> for NativeEndian<NonZero<i128>>
impl PartialEq<NonZero<u16>> for BigEndian<NonZero<u16>>
impl PartialEq<NonZero<u16>> for LittleEndian<NonZero<u16>>
impl PartialEq<NonZero<u16>> for NativeEndian<NonZero<u16>>
impl PartialEq<NonZero<u32>> for BigEndian<NonZero<u32>>
impl PartialEq<NonZero<u32>> for LittleEndian<NonZero<u32>>
impl PartialEq<NonZero<u32>> for NativeEndian<NonZero<u32>>
impl PartialEq<NonZero<u64>> for BigEndian<NonZero<u64>>
impl PartialEq<NonZero<u64>> for LittleEndian<NonZero<u64>>
impl PartialEq<NonZero<u64>> for NativeEndian<NonZero<u64>>
impl PartialEq<NonZero<u128>> for BigEndian<NonZero<u128>>
impl PartialEq<NonZero<u128>> for LittleEndian<NonZero<u128>>
impl PartialEq<NonZero<u128>> for NativeEndian<NonZero<u128>>
impl PartialEq<Duration> for ArchivedDuration
impl PartialEq<OsStr> for str
impl PartialEq<OsStr> for Path
impl PartialEq<OsStr> for PathBuf
impl PartialEq<OsString> for str
impl PartialEq<OsString> for Path
impl PartialEq<OsString> for PathBuf
impl PartialEq<Path> for OsStr
impl PartialEq<Path> for OsString
impl PartialEq<Path> for PathBuf
impl PartialEq<PathBuf> for OsStr
impl PartialEq<PathBuf> for OsString
impl PartialEq<PathBuf> for Path
impl PartialEq<EnumSet<CpuFeature>> for CpuFeature
impl PartialEq<BigEndian<char>> for char
impl PartialEq<BigEndian<f32>> for f32
impl PartialEq<BigEndian<f64>> for f64
impl PartialEq<BigEndian<i16>> for i16
impl PartialEq<BigEndian<i32>> for i32
impl PartialEq<BigEndian<i64>> for i64
impl PartialEq<BigEndian<i128>> for i128
impl PartialEq<BigEndian<u16>> for u16
impl PartialEq<BigEndian<u32>> for u32
impl PartialEq<BigEndian<u64>> for u64
impl PartialEq<BigEndian<u128>> for u128
impl PartialEq<BigEndian<NonZero<i16>>> for NonZero<i16>
impl PartialEq<BigEndian<NonZero<i32>>> for NonZero<i32>
impl PartialEq<BigEndian<NonZero<i64>>> for NonZero<i64>
impl PartialEq<BigEndian<NonZero<i128>>> for NonZero<i128>
impl PartialEq<BigEndian<NonZero<u16>>> for NonZero<u16>
impl PartialEq<BigEndian<NonZero<u32>>> for NonZero<u32>
impl PartialEq<BigEndian<NonZero<u64>>> for NonZero<u64>
impl PartialEq<BigEndian<NonZero<u128>>> for NonZero<u128>
impl PartialEq<LittleEndian<char>> for char
impl PartialEq<LittleEndian<f32>> for f32
impl PartialEq<LittleEndian<f64>> for f64
impl PartialEq<LittleEndian<i16>> for i16
impl PartialEq<LittleEndian<i32>> for i32
impl PartialEq<LittleEndian<i64>> for i64
impl PartialEq<LittleEndian<i128>> for i128
impl PartialEq<LittleEndian<u16>> for u16
impl PartialEq<LittleEndian<u32>> for u32
impl PartialEq<LittleEndian<u64>> for u64
impl PartialEq<LittleEndian<u128>> for u128
impl PartialEq<LittleEndian<NonZero<i16>>> for NonZero<i16>
impl PartialEq<LittleEndian<NonZero<i32>>> for NonZero<i32>
impl PartialEq<LittleEndian<NonZero<i64>>> for NonZero<i64>
impl PartialEq<LittleEndian<NonZero<i128>>> for NonZero<i128>
impl PartialEq<LittleEndian<NonZero<u16>>> for NonZero<u16>
impl PartialEq<LittleEndian<NonZero<u32>>> for NonZero<u32>
impl PartialEq<LittleEndian<NonZero<u64>>> for NonZero<u64>
impl PartialEq<LittleEndian<NonZero<u128>>> for NonZero<u128>
impl PartialEq<NativeEndian<char>> for char
impl PartialEq<NativeEndian<f32>> for f32
impl PartialEq<NativeEndian<f64>> for f64
impl PartialEq<NativeEndian<i16>> for i16
impl PartialEq<NativeEndian<i32>> for i32
impl PartialEq<NativeEndian<i64>> for i64
impl PartialEq<NativeEndian<i128>> for i128
impl PartialEq<NativeEndian<u16>> for u16
impl PartialEq<NativeEndian<u32>> for u32
impl PartialEq<NativeEndian<u64>> for u64
impl PartialEq<NativeEndian<u128>> for u128
impl PartialEq<NativeEndian<NonZero<i16>>> for NonZero<i16>
impl PartialEq<NativeEndian<NonZero<i32>>> for NonZero<i32>
impl PartialEq<NativeEndian<NonZero<i64>>> for NonZero<i64>
impl PartialEq<NativeEndian<NonZero<i128>>> for NonZero<i128>
impl PartialEq<NativeEndian<NonZero<u16>>> for NonZero<u16>
impl PartialEq<NativeEndian<NonZero<u32>>> for NonZero<u32>
impl PartialEq<NativeEndian<NonZero<u64>>> for NonZero<u64>
impl PartialEq<NativeEndian<NonZero<u128>>> for NonZero<u128>
impl PartialEq<ArchivedCString> for &CStr
impl PartialEq<ArchivedCString> for CString
impl PartialEq<ArchivedIpv4Addr> for Ipv4Addr
impl PartialEq<ArchivedIpv6Addr> for Ipv6Addr
impl PartialEq<ArchivedSocketAddrV4> for SocketAddrV4
impl PartialEq<ArchivedSocketAddrV6> for SocketAddrV6
impl PartialEq<ArchivedString> for &str
impl PartialEq<ArchivedString> for str
impl PartialEq<ArchivedString> for String
impl PartialEq<ArchivedDuration> for Duration
impl<'a> PartialEq for CompiledFunctionUnwindInfoReference<'a>
impl<'a> PartialEq for Component<'a>
impl<'a> PartialEq for Prefix<'a>
impl<'a> PartialEq for Location<'a>
impl<'a> PartialEq for Utf8Chunk<'a>
impl<'a> PartialEq for Components<'a>
impl<'a> PartialEq for PrefixComponent<'a>
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<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<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, '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>
impl<A, B> PartialEq<&B> for &A
impl<A, B> PartialEq<&B> for &mut A
impl<A, B> PartialEq<&mut B> for &A
impl<A, B> PartialEq<&mut B> for &mut A
impl<B, C> PartialEq for ControlFlow<B, C>
impl<Dyn> PartialEq for wasmer_types::lib::std::ptr::DynMetadata<Dyn>where
Dyn: ?Sized,
impl<Dyn> PartialEq for ptr_meta::DynMetadata<Dyn>where
Dyn: ?Sized,
impl<F> PartialEq for Fwhere
F: FnPtr,
impl<H> PartialEq for BuildHasherDefault<H>
impl<Idx> PartialEq for wasmer_types::lib::std::ops::Range<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for wasmer_types::lib::std::ops::RangeFrom<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for wasmer_types::lib::std::ops::RangeInclusive<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for RangeTo<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for RangeToInclusive<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for core::range::Range<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for core::range::RangeFrom<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for core::range::RangeInclusive<Idx>where
Idx: PartialEq,
impl<K> PartialEq for ArchivedBTreeSet<K>where
K: PartialEq,
impl<K> PartialEq for ArchivedHashSet<K>
impl<K> PartialEq for ArchivedIndexSet<K>where
K: PartialEq,
impl<K, AK> PartialEq<BTreeSet<K>> for ArchivedBTreeSet<AK>where
AK: PartialEq<K>,
impl<K, AK> PartialEq<ArchivedBTreeSet<AK>> for BTreeSet<K>where
AK: PartialEq<K>,
impl<K, AK, S> PartialEq<HashSet<K, S>> for ArchivedHashSet<AK>
impl<K, AK, S> PartialEq<HashSet<K, S>> for ArchivedHashSet<AK>
impl<K, AK, S> PartialEq<ArchivedHashSet<AK>> for std::collections::hash::set::HashSet<K, S>
impl<K, AK, S> PartialEq<ArchivedHashSet<AK>> for hashbrown::set::HashSet<K, S>
impl<K, V1, S1, V2, S2> PartialEq<IndexMap<K, V2, S2>> for IndexMap<K, V1, S1>
impl<K, V> PartialEq for SecondaryMap<K, V>
impl<K, V> PartialEq for ArchivedBTreeMap<K, V>
impl<K, V> PartialEq for ArchivedHashMap<K, V>
impl<K, V> PartialEq for ArchivedIndexMap<K, V>
impl<K, V, A> PartialEq for BTreeMap<K, V, A>
impl<K, V, AK, AV> PartialEq<BTreeMap<K, V>> for ArchivedBTreeMap<AK, AV>
impl<K, V, AK, AV> PartialEq<ArchivedBTreeMap<AK, AV>> for BTreeMap<K, V>
impl<K, V, AK, AV> PartialEq<ArchivedHashMap<AK, AV>> for std::collections::hash::map::HashMap<K, V>
impl<K, V, AK, AV> PartialEq<ArchivedHashMap<AK, AV>> for hashbrown::map::HashMap<K, V>
impl<K, V, AK, AV, S> PartialEq<HashMap<K, V, S>> for ArchivedHashMap<AK, AV>
impl<K, V, AK, AV, S> PartialEq<HashMap<K, V, S>> for ArchivedHashMap<AK, AV>
impl<K, V, S> PartialEq for std::collections::hash::map::HashMap<K, V, S>
impl<K, V, S, A> PartialEq for hashbrown::map::HashMap<K, V, S, A>
impl<K, V, UK, UV> PartialEq<Entry<UK, UV>> for Entry<K, V>
impl<K, V: PartialEq> PartialEq for PrimaryMap<K, V>
impl<Ptr, Q> PartialEq<Pin<Q>> for Pin<Ptr>
impl<T> PartialEq for Bound<T>where
T: PartialEq,
impl<T> PartialEq for TrySendError<T>where
T: PartialEq,
impl<T> PartialEq for Option<T>where
T: PartialEq,
impl<T> PartialEq for Poll<T>where
T: PartialEq,
impl<T> PartialEq for ArchivedOption<T>where
T: PartialEq,
impl<T> PartialEq for *const Twhere
T: ?Sized,
impl<T> PartialEq for *mut Twhere
T: ?Sized,
impl<T> PartialEq for (T₁, T₂, …, Tₙ)
This trait is implemented for tuples up to twelve items long.
impl<T> PartialEq for Cell<T>
impl<T> PartialEq for wasmer_types::lib::std::cell::OnceCell<T>where
T: PartialEq,
impl<T> PartialEq for RefCell<T>
impl<T> PartialEq for PhantomData<T>where
T: ?Sized,
impl<T> PartialEq for Discriminant<T>
impl<T> PartialEq for ManuallyDrop<T>
impl<T> PartialEq for NonNull<T>where
T: ?Sized,
impl<T> PartialEq for SendError<T>where
T: PartialEq,
impl<T> PartialEq for OnceLock<T>where
T: PartialEq,
impl<T> PartialEq for NonZero<T>where
T: ZeroablePrimitive + PartialEq,
impl<T> PartialEq for Saturating<T>where
T: PartialEq,
impl<T> PartialEq for Wrapping<T>where
T: PartialEq,
impl<T> PartialEq for Cursor<T>where
T: PartialEq,
impl<T> PartialEq for EnumSet<T>
impl<T> PartialEq for once_cell::unsync::OnceCell<T>where
T: PartialEq,
impl<T> PartialEq for ArchivedOptionBox<T>
impl<T> PartialEq for ArchivedRange<T>where
T: PartialEq,
impl<T> PartialEq for ArchivedRangeFrom<T>where
T: PartialEq,
impl<T> PartialEq for ArchivedRangeInclusive<T>where
T: PartialEq,
impl<T> PartialEq for ArchivedRangeTo<T>where
T: PartialEq,
impl<T> PartialEq for ArchivedRangeToInclusive<T>where
T: PartialEq,
impl<T> PartialEq for Reverse<T>where
T: PartialEq,
impl<T> PartialEq<T> for EnumSet<T>where
T: EnumSetType,
impl<T, A> PartialEq for Box<T, A>
impl<T, A> PartialEq for Rc<T, A>
impl<T, A> PartialEq for Arc<T, A>
impl<T, A> PartialEq for BTreeSet<T, A>
impl<T, A> PartialEq for LinkedList<T, A>
impl<T, A> PartialEq for VecDeque<T, A>
impl<T, E> PartialEq for Result<T, E>
impl<T, E> PartialEq for ArchivedResult<T, E>
impl<T, N> PartialEq for GenericArray<T, N>where
T: PartialEq,
N: ArrayLength<T>,
impl<T, S1, S2> PartialEq<IndexSet<T, S2>> for IndexSet<T, S1>
impl<T, S> PartialEq for std::collections::hash::set::HashSet<T, S>
impl<T, S, A> PartialEq for hashbrown::set::HashSet<T, S, A>
impl<T, TF, U, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF>
impl<T, U> PartialEq<&[U]> for Cow<'_, [T]>
impl<T, U> PartialEq<&mut [U]> for Cow<'_, [T]>
impl<T, U> PartialEq<Option<Box<T>>> for ArchivedOptionBox<U>
impl<T, U> PartialEq<Option<T>> for ArchivedOption<U>where
U: PartialEq<T>,
impl<T, U> PartialEq<ArchivedOption<T>> for Option<U>where
T: PartialEq<U>,
impl<T, U> PartialEq<[U]> for [T]where
T: PartialEq<U>,
impl<T, U> PartialEq<[U]> for RawArchivedVec<T>where
T: PartialEq<U>,
impl<T, U> PartialEq<[U]> for ArchivedVec<T>where
T: PartialEq<U>,
impl<T, U> PartialEq<Box<U>> for ArchivedBox<T>
impl<T, U> PartialEq<Range<T>> for ArchivedRange<U>where
U: PartialEq<T>,
impl<T, U> PartialEq<RangeFrom<T>> for ArchivedRangeFrom<U>where
U: PartialEq<T>,
impl<T, U> PartialEq<RangeInclusive<T>> for ArchivedRangeInclusive<U>where
U: PartialEq<T>,
impl<T, U> PartialEq<RangeTo<T>> for ArchivedRangeTo<U>where
U: PartialEq<T>,
impl<T, U> PartialEq<RangeToInclusive<T>> for ArchivedRangeToInclusive<U>where
U: PartialEq<T>,
impl<T, U> PartialEq<Rc<U>> for ArchivedRc<T, RcFlavor>
impl<T, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor>
has_atomics
only.