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<EntityIndex> for EntityIndex
impl PartialEq<FlagValue> for FlagValue
impl PartialEq<GlobalInit> for GlobalInit
impl PartialEq<Trap> for Trap
impl PartialEq<WasmHeapType> for WasmHeapType
impl PartialEq<WasmType> for WasmType
impl PartialEq<BlockType> for BlockType
impl PartialEq<CanonicalOption> for CanonicalOption
impl PartialEq<ComponentExternalKind> for ComponentExternalKind
impl PartialEq<ComponentOuterAliasKind> for ComponentOuterAliasKind
impl PartialEq<ComponentTypeRef> for ComponentTypeRef
impl PartialEq<ComponentValType> for ComponentValType
impl PartialEq<Encoding> for wasmtime_environ::wasmparser::Encoding
impl PartialEq<ExternalKind> for ExternalKind
impl PartialEq<FrameKind> for FrameKind
impl PartialEq<HeapType> for HeapType
impl PartialEq<InstantiationArgKind> for InstantiationArgKind
impl PartialEq<OuterAliasKind> for OuterAliasKind
impl PartialEq<PrimitiveValType> for PrimitiveValType
impl PartialEq<StorageType> for StorageType
impl PartialEq<TypeBounds> for TypeBounds
impl PartialEq<ValType> for ValType
impl PartialEq<KebabNameKind<'_>> for KebabNameKind<'_>
impl PartialEq<AsciiChar> for AsciiChar
impl PartialEq<Ordering> for wasmtime_environ::__core::cmp::Ordering
impl PartialEq<Infallible> for Infallible
impl PartialEq<Alignment> for wasmtime_environ::__core::fmt::Alignment
impl PartialEq<IpAddr> for IpAddr
impl PartialEq<IpAddr> for Ipv4Addr
impl PartialEq<IpAddr> for Ipv6Addr
impl PartialEq<Ipv6MulticastScope> for Ipv6MulticastScope
impl PartialEq<SocketAddr> for SocketAddr
impl PartialEq<FpCategory> for FpCategory
impl PartialEq<IntErrorKind> for IntErrorKind
impl PartialEq<Which> for Which
impl PartialEq<SearchStep> for SearchStep
impl PartialEq<Ordering> for wasmtime_environ::__core::sync::atomic::Ordering
impl PartialEq<TryReserveErrorKind> for TryReserveErrorKind
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<RecvTimeoutError> for RecvTimeoutError
impl PartialEq<TryRecvError> for TryRecvError
impl PartialEq<DwarfFileType> for DwarfFileType
impl PartialEq<Format> for Format
impl PartialEq<SectionId> for gimli::common::SectionId
impl PartialEq<RunTimeEndian> for RunTimeEndian
impl PartialEq<Pointer> for Pointer
impl PartialEq<Error> for gimli::read::Error
impl PartialEq<ColumnType> for ColumnType
impl PartialEq<Value> for Value
impl PartialEq<ValueType> for ValueType
impl PartialEq<CallFrameInstruction> for gimli::write::cfi::CallFrameInstruction
impl PartialEq<ConvertError> for ConvertError
impl PartialEq<Address> for Address
impl PartialEq<Error> for gimli::write::Error
impl PartialEq<Reference> for Reference
impl PartialEq<LineString> for LineString
impl PartialEq<Location> for gimli::write::loc::Location
impl PartialEq<Range> for gimli::write::range::Range
impl PartialEq<AttributeValue> for gimli::write::unit::AttributeValue
impl PartialEq<Level> for Level
impl PartialEq<Level> for LevelFilter
impl PartialEq<LevelFilter> for Level
impl PartialEq<LevelFilter> for LevelFilter
impl PartialEq<AddressSize> for AddressSize
impl PartialEq<Architecture> for object::common::Architecture
impl PartialEq<BinaryFormat> for object::common::BinaryFormat
impl PartialEq<ComdatKind> for ComdatKind
impl PartialEq<FileFlags> for FileFlags
impl PartialEq<RelocationEncoding> for RelocationEncoding
impl PartialEq<RelocationKind> for RelocationKind
impl PartialEq<SectionFlags> for SectionFlags
impl PartialEq<SectionKind> for SectionKind
impl PartialEq<SegmentFlags> for SegmentFlags
impl PartialEq<SymbolKind> for SymbolKind
impl PartialEq<SymbolScope> for SymbolScope
impl PartialEq<Endianness> for object::endian::Endianness
impl PartialEq<CompressionFormat> for CompressionFormat
impl PartialEq<FileKind> for FileKind
impl PartialEq<ObjectKind> for ObjectKind
impl PartialEq<RelocationTarget> for RelocationTarget
impl PartialEq<SymbolSection> for object::read::SymbolSection
impl PartialEq<Mangling> for Mangling
impl PartialEq<StandardSection> for StandardSection
impl PartialEq<StandardSegment> for StandardSegment
impl PartialEq<SymbolSection> for object::write::SymbolSection
impl PartialEq<Op> for Op
impl PartialEq<CDataModel> for CDataModel
impl PartialEq<Size> for Size
impl PartialEq<ParseError> for ParseError
impl PartialEq<Aarch64Architecture> for Aarch64Architecture
impl PartialEq<Architecture> for target_lexicon::targets::Architecture
impl PartialEq<ArmArchitecture> for ArmArchitecture
impl PartialEq<BinaryFormat> for target_lexicon::targets::BinaryFormat
impl PartialEq<CustomVendor> for CustomVendor
impl PartialEq<Environment> for Environment
impl PartialEq<Mips32Architecture> for Mips32Architecture
impl PartialEq<Mips64Architecture> for Mips64Architecture
impl PartialEq<OperatingSystem> for OperatingSystem
impl PartialEq<Riscv32Architecture> for Riscv32Architecture
impl PartialEq<Riscv64Architecture> for Riscv64Architecture
impl PartialEq<Vendor> for Vendor
impl PartialEq<X86_32Architecture> for X86_32Architecture
impl PartialEq<CallingConvention> for CallingConvention
impl PartialEq<Endianness> for target_lexicon::triple::Endianness
impl PartialEq<PointerWidth> for PointerWidth
impl PartialEq<bool> for bool
impl PartialEq<char> for char
impl PartialEq<f32> for f32
impl PartialEq<f64> for f64
impl PartialEq<i8> for i8
impl PartialEq<i16> for i16
impl PartialEq<i32> for i32
impl PartialEq<i64> for i64
impl PartialEq<i128> for 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<u8> for u8
impl PartialEq<u16> for u16
impl PartialEq<u32> for u32
impl PartialEq<u64> for u64
impl PartialEq<u128> for u128
impl PartialEq<()> for ()
impl PartialEq<usize> for usize
impl PartialEq<DataIndex> for DataIndex
impl PartialEq<DefinedFuncIndex> for DefinedFuncIndex
impl PartialEq<DefinedGlobalIndex> for DefinedGlobalIndex
impl PartialEq<DefinedMemoryIndex> for DefinedMemoryIndex
impl PartialEq<DefinedTableIndex> for DefinedTableIndex
impl PartialEq<ElemIndex> for ElemIndex
impl PartialEq<FilePos> for FilePos
impl PartialEq<FuncIndex> for FuncIndex
impl PartialEq<FuncRefIndex> for FuncRefIndex
impl PartialEq<Global> for Global
impl PartialEq<GlobalIndex> for GlobalIndex
impl PartialEq<InstructionAddressMap> for InstructionAddressMap
impl PartialEq<Memory> for Memory
impl PartialEq<MemoryIndex> for MemoryIndex
impl PartialEq<OwnedMemoryIndex> for OwnedMemoryIndex
impl PartialEq<SignatureIndex> for SignatureIndex
impl PartialEq<StaticModuleIndex> for StaticModuleIndex
impl PartialEq<Table> for Table
impl PartialEq<TableIndex> for TableIndex
impl PartialEq<Tag> for Tag
impl PartialEq<TagIndex> for TagIndex
impl PartialEq<TrapInformation> for TrapInformation
impl PartialEq<TypeIndex> for TypeIndex
impl PartialEq<WasmFuncType> for WasmFuncType
impl PartialEq<WasmRefType> for WasmRefType
impl PartialEq<KebabName> for KebabName
impl PartialEq<KebabStr> for KebabStr
impl PartialEq<KebabStr> for KebabString
impl PartialEq<KebabString> for KebabStr
impl PartialEq<KebabString> for KebabString
impl PartialEq<ArrayType> for ArrayType
impl PartialEq<FieldType> for FieldType
impl PartialEq<FuncType> for FuncType
impl PartialEq<GlobalType> for GlobalType
impl PartialEq<Ieee32> for Ieee32
impl PartialEq<Ieee64> for Ieee64
impl PartialEq<MemoryType> for MemoryType
impl PartialEq<RefType> for RefType
impl PartialEq<StructType> for StructType
impl PartialEq<TableType> for TableType
impl PartialEq<V128> for V128
impl PartialEq<ResourceId> for ResourceId
impl PartialEq<TypeId> for wasmtime_environ::wasmparser::types::TypeId
impl PartialEq<AllocError> for AllocError
impl PartialEq<Layout> for Layout
impl PartialEq<LayoutError> for LayoutError
impl PartialEq<TypeId> for wasmtime_environ::__core::any::TypeId
impl PartialEq<CpuidResult> for CpuidResult
impl PartialEq<CharTryFromError> for CharTryFromError
impl PartialEq<DecodeUtf16Error> for DecodeUtf16Error
impl PartialEq<ParseCharError> for ParseCharError
impl PartialEq<TryFromCharError> for TryFromCharError
impl PartialEq<CStr> for CStr
impl PartialEq<FromBytesUntilNulError> for FromBytesUntilNulError
impl PartialEq<FromBytesWithNulError> for FromBytesWithNulError
impl PartialEq<Error> for wasmtime_environ::__core::fmt::Error
impl PartialEq<PhantomPinned> for PhantomPinned
impl PartialEq<Assume> for Assume
impl PartialEq<AddrParseError> for AddrParseError
impl PartialEq<Ipv4Addr> for IpAddr
impl PartialEq<Ipv4Addr> for Ipv4Addr
impl PartialEq<Ipv6Addr> for IpAddr
impl PartialEq<Ipv6Addr> for Ipv6Addr
impl PartialEq<SocketAddrV4> for SocketAddrV4
impl PartialEq<SocketAddrV6> for SocketAddrV6
impl PartialEq<NonZeroI8> for NonZeroI8
impl PartialEq<NonZeroI16> for NonZeroI16
impl PartialEq<NonZeroI32> for NonZeroI32
impl PartialEq<NonZeroI64> for NonZeroI64
impl PartialEq<NonZeroI128> for NonZeroI128
impl PartialEq<NonZeroIsize> for NonZeroIsize
impl PartialEq<NonZeroU8> for NonZeroU8
impl PartialEq<NonZeroU16> for NonZeroU16
impl PartialEq<NonZeroU32> for NonZeroU32
impl PartialEq<NonZeroU64> for NonZeroU64
impl PartialEq<NonZeroU128> for NonZeroU128
impl PartialEq<NonZeroUsize> for NonZeroUsize
impl PartialEq<ParseFloatError> for ParseFloatError
impl PartialEq<ParseIntError> for ParseIntError
impl PartialEq<TryFromIntError> for TryFromIntError
impl PartialEq<RangeFull> for RangeFull
impl PartialEq<Alignment> for wasmtime_environ::__core::ptr::Alignment
impl PartialEq<ParseBoolError> for ParseBoolError
impl PartialEq<Utf8Error> for Utf8Error
impl PartialEq<RawWaker> for RawWaker
impl PartialEq<RawWakerVTable> for RawWakerVTable
impl PartialEq<Duration> for Duration
impl PartialEq<TryFromFloatSecsError> for TryFromFloatSecsError
impl PartialEq<TryReserveError> for alloc::collections::TryReserveError
impl PartialEq<CString> for CString
impl PartialEq<FromVecWithNulError> for FromVecWithNulError
impl PartialEq<IntoStringError> for IntoStringError
impl PartialEq<NulError> for NulError
impl PartialEq<FromUtf8Error> for FromUtf8Error
impl PartialEq<String> for String
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<InvalidHandleError> for InvalidHandleError
impl PartialEq<NullHandleError> for NullHandleError
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<WaitTimeoutResult> for WaitTimeoutResult
impl PartialEq<RecvError> for RecvError
impl PartialEq<AccessError> for AccessError
impl PartialEq<ThreadId> for ThreadId
impl PartialEq<Instant> for Instant
impl PartialEq<SystemTime> for SystemTime
impl PartialEq<DebugTypeSignature> for DebugTypeSignature
impl PartialEq<DwoId> for DwoId
impl PartialEq<Encoding> for gimli::common::Encoding
impl PartialEq<LineEncoding> for LineEncoding
impl PartialEq<Register> for Register
impl PartialEq<DwAccess> for DwAccess
impl PartialEq<DwAddr> for DwAddr
impl PartialEq<DwAt> for DwAt
impl PartialEq<DwAte> for DwAte
impl PartialEq<DwCc> for DwCc
impl PartialEq<DwCfa> for DwCfa
impl PartialEq<DwChildren> for DwChildren
impl PartialEq<DwDefaulted> for DwDefaulted
impl PartialEq<DwDs> for DwDs
impl PartialEq<DwDsc> for DwDsc
impl PartialEq<DwEhPe> for DwEhPe
impl PartialEq<DwEnd> for DwEnd
impl PartialEq<DwForm> for DwForm
impl PartialEq<DwId> for DwId
impl PartialEq<DwIdx> for DwIdx
impl PartialEq<DwInl> for DwInl
impl PartialEq<DwLang> for DwLang
impl PartialEq<DwLle> for DwLle
impl PartialEq<DwLnct> for DwLnct
impl PartialEq<DwLne> for DwLne
impl PartialEq<DwLns> for DwLns
impl PartialEq<DwMacro> for DwMacro
impl PartialEq<DwOp> for DwOp
impl PartialEq<DwOrd> for DwOrd
impl PartialEq<DwRle> for DwRle
impl PartialEq<DwSect> for DwSect
impl PartialEq<DwSectV2> for DwSectV2
impl PartialEq<DwTag> for DwTag
impl PartialEq<DwUt> for DwUt
impl PartialEq<DwVirtuality> for DwVirtuality
impl PartialEq<DwVis> for DwVis
impl PartialEq<BigEndian> for gimli::endianity::BigEndian
impl PartialEq<LittleEndian> for gimli::endianity::LittleEndian
impl PartialEq<Abbreviation> for Abbreviation
impl PartialEq<AttributeSpecification> for AttributeSpecification
impl PartialEq<ArangeEntry> for ArangeEntry
impl PartialEq<Augmentation> for Augmentation
impl PartialEq<BaseAddresses> for BaseAddresses
impl PartialEq<SectionBaseAddresses> for SectionBaseAddresses
impl PartialEq<UnitIndexSection> for UnitIndexSection
impl PartialEq<FileEntryFormat> for FileEntryFormat
impl PartialEq<LineRow> for LineRow
impl PartialEq<ReaderOffsetId> for ReaderOffsetId
impl PartialEq<Range> for gimli::read::rnglists::Range
impl PartialEq<StoreOnHeap> for StoreOnHeap
impl PartialEq<CieId> for CieId
impl PartialEq<CommonInformationEntry> for gimli::write::cfi::CommonInformationEntry
impl PartialEq<FrameDescriptionEntry> for gimli::write::cfi::FrameDescriptionEntry
impl PartialEq<FileId> for FileId
impl PartialEq<DirectoryId> for DirectoryId
impl PartialEq<FileInfo> for FileInfo
impl PartialEq<LocationList> for LocationList
impl PartialEq<LocationListId> for LocationListId
impl PartialEq<Expression> for gimli::write::op::Expression
impl PartialEq<RangeList> for RangeList
impl PartialEq<RangeListId> for RangeListId
impl PartialEq<LineStringId> for LineStringId
impl PartialEq<StringId> for gimli::write::str::StringId
impl PartialEq<Attribute> for gimli::write::unit::Attribute
impl PartialEq<UnitEntryId> for UnitEntryId
impl PartialEq<UnitId> for UnitId
impl PartialEq<TryReserveError> for indexmap::TryReserveError
impl PartialEq<ParseLevelError> for ParseLevelError
impl PartialEq<BigEndian> for object::endian::BigEndian
impl PartialEq<LittleEndian> for object::endian::LittleEndian
impl PartialEq<CompressedFileRange> for CompressedFileRange
impl PartialEq<Error> for object::read::Error
impl PartialEq<SectionIndex> for object::read::SectionIndex
impl PartialEq<SymbolIndex> for object::read::SymbolIndex
impl PartialEq<SectionIndex> for object::write::elf::writer::SectionIndex
impl PartialEq<SymbolIndex> for object::write::elf::writer::SymbolIndex
impl PartialEq<StringId> for object::write::string::StringId
impl PartialEq<ComdatId> for ComdatId
impl PartialEq<Error> for object::write::Error
impl PartialEq<SectionId> for object::write::SectionId
impl PartialEq<SymbolId> for SymbolId
impl PartialEq<BuildMetadata> for BuildMetadata
impl PartialEq<Comparator> for Comparator
impl PartialEq<Prerelease> for Prerelease
impl PartialEq<Version> for Version
impl PartialEq<VersionReq> for VersionReq
impl PartialEq<IgnoredAny> for IgnoredAny
impl PartialEq<Error> for serde::de::value::Error
impl PartialEq<Triple> for Triple
impl PartialEq<TryReserveError> for TryReserveError
impl PartialEq<TryReserveError> for TryReserveError
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<ComponentDefinedType<'a>> for ComponentDefinedType<'a>
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<Unexpected<'a>> for Unexpected<'a>
impl<'a> PartialEq<VariantCase<'a>> for VariantCase<'a>
impl<'a> PartialEq<Location<'a>> for wasmtime_environ::__core::panic::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> PartialEq<Metadata<'a>> for Metadata<'a>
impl<'a> PartialEq<MetadataBuilder<'a>> for MetadataBuilder<'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<'bases, Section, R> PartialEq<CieOrFde<'bases, Section, R>> for CieOrFde<'bases, Section, R>where Section: PartialEq<Section> + UnwindSection<R>, R: PartialEq<R> + Reader,
impl<'bases, Section, R> PartialEq<PartialFrameDescriptionEntry<'bases, Section, R>> for PartialFrameDescriptionEntry<'bases, Section, R>where Section: PartialEq<Section> + UnwindSection<R>, R: PartialEq<R> + Reader, <R as Reader>::Offset: PartialEq<<R as Reader>::Offset>, <Section as UnwindSection<R>>::Offset: PartialEq<<Section as UnwindSection<R>>::Offset>,
impl<'data> PartialEq<CodeView<'data>> for CodeView<'data>
impl<'data> PartialEq<CompressedData<'data>> for CompressedData<'data>
impl<'data> PartialEq<Export<'data>> for Export<'data>
impl<'data> PartialEq<Import<'data>> for Import<'data>
impl<'data> PartialEq<ObjectMapEntry<'data>> for ObjectMapEntry<'data>
impl<'data> PartialEq<SymbolMapName<'data>> for SymbolMapName<'data>
impl<'data> PartialEq<Bytes<'data>> for Bytes<'data>
impl<'input, Endian> PartialEq<EndianSlice<'input, Endian>> for EndianSlice<'input, Endian>where Endian: PartialEq<Endian> + Endianity,
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 DynMetadata<Dyn>where Dyn: ?Sized,
impl<E> PartialEq<I16<E>> for I16<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<I32<E>> for I32<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<I64<E>> for I64<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<U16<E>> for U16<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<U32<E>> for U32<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<U64<E>> for U64<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<I16Bytes<E>> for I16Bytes<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<I32Bytes<E>> for I32Bytes<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<I64Bytes<E>> for I64Bytes<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<U16Bytes<E>> for U16Bytes<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<U32Bytes<E>> for U32Bytes<E>where E: PartialEq<E> + Endian,
impl<E> PartialEq<U64Bytes<E>> for U64Bytes<E>where E: PartialEq<E> + Endian,
impl<F> PartialEq<F> for Fwhere F: FnPtr,
impl<H> PartialEq<BuildHasherDefault<H>> for BuildHasherDefault<H>
impl<Idx> PartialEq<Range<Idx>> for wasmtime_environ::__core::ops::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, V1, S1, V2, S2> PartialEq<IndexMap<K, V2, S2>> for indexmap::map::IndexMap<K, V1, S1>where K: Hash + Eq, V1: PartialEq<V2>, S1: BuildHasher, S2: BuildHasher,
impl<K, V1, S1, V2, S2> PartialEq<IndexMap<K, V2, S2>> for indexmap::map::IndexMap<K, V1, S1>where K: Hash + Eq, V1: PartialEq<V2>, S1: BuildHasher, S2: BuildHasher,
impl<K, V> PartialEq<PrimaryMap<K, V>> for PrimaryMap<K, V>where K: PartialEq<K> + EntityRef, V: PartialEq<V>,
impl<K, V> PartialEq<SecondaryMap<K, V>> for SecondaryMap<K, V>where K: EntityRef, V: Clone + PartialEq<V>,
impl<K, V> PartialEq<Slice<K, V>> for indexmap::map::slice::Slice<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, 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, 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<Offset> PartialEq<UnitType<Offset>> for UnitType<Offset>where Offset: PartialEq<Offset> + ReaderOffset,
impl<P, Q> PartialEq<Pin<Q>> for Pin<P>where P: Deref, Q: Deref, <P as Deref>::Target: PartialEq<<Q as Deref>::Target>,
impl<R> PartialEq<CallFrameInstruction<R>> for gimli::read::cfi::CallFrameInstruction<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<CfaRule<R>> for CfaRule<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<RegisterRule<R>> for RegisterRule<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<EvaluationResult<R>> for EvaluationResult<R>where R: PartialEq<R> + Reader, <R as Reader>::Offset: PartialEq<<R as Reader>::Offset>,
impl<R> PartialEq<DebugFrame<R>> for DebugFrame<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<EhFrame<R>> for EhFrame<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<EhFrameHdr<R>> for EhFrameHdr<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<LocationListEntry<R>> for LocationListEntry<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<Expression<R>> for gimli::read::op::Expression<R>where R: PartialEq<R> + Reader,
impl<R> PartialEq<Attribute<R>> for gimli::read::unit::Attribute<R>where R: PartialEq<R> + Reader,
impl<R, A> PartialEq<UnwindContext<R, A>> for UnwindContext<R, A>where R: PartialEq<R> + Reader, A: PartialEq<A> + UnwindContextStorage<R>, <A as UnwindContextStorage<R>>::Stack: PartialEq<<A as UnwindContextStorage<R>>::Stack>,
impl<R, Offset> PartialEq<LineInstruction<R, Offset>> for LineInstruction<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<Location<R, Offset>> for gimli::read::op::Location<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<Operation<R, Offset>> for Operation<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<AttributeValue<R, Offset>> for gimli::read::unit::AttributeValue<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<ArangeHeader<R, Offset>> for ArangeHeader<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<CommonInformationEntry<R, Offset>> for gimli::read::cfi::CommonInformationEntry<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<FrameDescriptionEntry<R, Offset>> for gimli::read::cfi::FrameDescriptionEntry<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<CompleteLineProgram<R, Offset>> for CompleteLineProgram<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<FileEntry<R, Offset>> for FileEntry<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<IncompleteLineProgram<R, Offset>> for IncompleteLineProgram<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<LineProgramHeader<R, Offset>> for LineProgramHeader<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<Piece<R, Offset>> for Piece<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, Offset> PartialEq<UnitHeader<R, Offset>> for UnitHeader<R, Offset>where R: PartialEq<R> + Reader<Offset = Offset>, Offset: PartialEq<Offset> + ReaderOffset,
impl<R, S> PartialEq<UnwindTableRow<R, S>> for UnwindTableRow<R, S>where R: PartialEq<R> + Reader, S: PartialEq<S> + UnwindContextStorage<R>,
impl<Section, Symbol> PartialEq<SymbolFlags<Section, Symbol>> for SymbolFlags<Section, Symbol>where Section: PartialEq<Section>, Symbol: PartialEq<Symbol>,
impl<T> PartialEq<Bound<T>> for Bound<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<TrySendError<T>> for TrySendError<T>where T: PartialEq<T>,
impl<T> PartialEq<UnitSectionOffset<T>> for UnitSectionOffset<T>where T: PartialEq<T>,
impl<T> PartialEq<DieReference<T>> for DieReference<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.