Trait PartialEq

1.0.0 · Source
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 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> and B: PartialEq<A>, then a == b implies b == a; and

  • Transitivity: if A: PartialEq<B> and B: PartialEq<C> and A: PartialEq<C>, then a == b and b == c implies a == c. This must also work for longer chains, such as when A: PartialEq<B>, B: PartialEq<C>, C: PartialEq<D>, and A: 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 impls that allow comparing T == U. In other words, if other crates add impls 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 impls that “stitch together” comparisons of foreign types in ways that violate transitivity.

Not having such foreign impls 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 derived on structs, two instances are equal if all fields are equal, and not equal if any fields are not equal. When derived 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 BookFormats to be compared with Books.

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§

1.0.0 · Source

fn eq(&self, other: &Rhs) -> bool

Tests for self and other values to be equal, and is used by ==.

Provided Methods§

1.0.0 · Source

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementors§

Source§

impl PartialEq for AsciiChar

Source§

impl PartialEq for TryReserveErrorKind

1.34.0 · Source§

impl PartialEq for Infallible

Source§

impl PartialEq for VarError

1.28.0 · Source§

impl PartialEq for origin_studio::fmt::Alignment

Source§

impl PartialEq for DebugAsHex

Source§

impl PartialEq for Sign

Source§

impl PartialEq for origin_studio::io::SeekFrom

1.7.0 · Source§

impl PartialEq for IpAddr

Source§

impl PartialEq for Ipv6MulticastScope

1.0.0 · Source§

impl PartialEq for SocketAddr

1.0.0 · Source§

impl PartialEq for FpCategory

1.55.0 · Source§

impl PartialEq for IntErrorKind

1.86.0 · Source§

impl PartialEq for GetDisjointMutError

Source§

impl PartialEq for SearchStep

1.0.0 · Source§

impl PartialEq for origin_studio::sync::atomic::Ordering

1.0.0 · Source§

impl PartialEq for origin_studio::cmp::Ordering

1.64.0 · Source§

impl PartialEq for FromBytesWithNulError

Source§

impl PartialEq for DwarfFileType

Source§

impl PartialEq for Format

Source§

impl PartialEq for SectionId

Source§

impl PartialEq for Vendor

Source§

impl PartialEq for RunTimeEndian

Source§

impl PartialEq for Pointer

Source§

impl PartialEq for gimli::read::Error

Source§

impl PartialEq for IndexSectionId

Source§

impl PartialEq for Value

Source§

impl PartialEq for ValueType

Source§

impl PartialEq for fsconfig_command

Source§

impl PartialEq for membarrier_cmd

Source§

impl PartialEq for membarrier_cmd_flag

Source§

impl PartialEq for procmap_query_flags

Source§

impl PartialEq for rustix::backend::fs::types::Advice

Source§

impl PartialEq for FileType

Source§

impl PartialEq for FlockOperation

Source§

impl PartialEq for rustix::backend::mm::types::Advice

Source§

impl PartialEq for Resource

Source§

impl PartialEq for MembarrierCommand

Source§

impl PartialEq for TimerfdClockId

Source§

impl PartialEq for ClockId

Source§

impl PartialEq for rustix::fs::seek_from::SeekFrom

Source§

impl PartialEq for Direction

Source§

impl PartialEq for DumpableBehavior

Source§

impl PartialEq for EndianMode

Source§

impl PartialEq for FloatingPointMode

Source§

impl PartialEq for MachineCheckMemoryCorruptionKillPolicy

Source§

impl PartialEq for PTracer

Source§

impl PartialEq for SpeculationFeature

Source§

impl PartialEq for TimeStampCounterReadability

Source§

impl PartialEq for TimingMethod

Source§

impl PartialEq for VirtualMemoryMapAddress

Source§

impl PartialEq for FlockOffsetType

Source§

impl PartialEq for FlockType

Source§

impl PartialEq for WakeOp

Source§

impl PartialEq for WakeOpCmp

Source§

impl PartialEq for Capability

Source§

impl PartialEq for CoreSchedulingScope

Source§

impl PartialEq for SecureComputingMode

Source§

impl PartialEq for SysCallUserDispatchFastSwitch

Source§

impl PartialEq for LinkNameSpaceType

1.0.0 · Source§

impl PartialEq for bool

1.0.0 · Source§

impl PartialEq for char

1.0.0 · Source§

impl PartialEq for f16

1.0.0 · Source§

impl PartialEq for f32

1.0.0 · Source§

impl PartialEq for f64

1.0.0 · Source§

impl PartialEq for f128

1.0.0 · Source§

impl PartialEq for i8

1.0.0 · Source§

impl PartialEq for i16

1.0.0 · Source§

impl PartialEq for i32

1.0.0 · Source§

impl PartialEq for i64

1.0.0 · Source§

impl PartialEq for i128

1.0.0 · Source§

impl PartialEq for isize

Source§

impl PartialEq for !

1.0.0 · Source§

impl PartialEq for str

1.0.0 · Source§

impl PartialEq for u8

1.0.0 · Source§

impl PartialEq for u16

1.0.0 · Source§

impl PartialEq for u32

1.0.0 · Source§

impl PartialEq for u64

1.0.0 · Source§

impl PartialEq for u128

1.0.0 · Source§

impl PartialEq for ()

1.0.0 · Source§

impl PartialEq for usize

Source§

impl PartialEq for AllocError

1.28.0 · Source§

impl PartialEq for Layout

1.50.0 · Source§

impl PartialEq for LayoutError

1.0.0 · Source§

impl PartialEq for TypeId

1.27.0 · Source§

impl PartialEq for CpuidResult

Source§

impl PartialEq for ByteStr

1.34.0 · Source§

impl PartialEq for CharTryFromError

1.9.0 · Source§

impl PartialEq for DecodeUtf16Error

1.20.0 · Source§

impl PartialEq for ParseCharError

1.59.0 · Source§

impl PartialEq for TryFromCharError

Source§

impl PartialEq for UnorderedKeyError

1.57.0 · Source§

impl PartialEq for TryReserveError

1.64.0 · Source§

impl PartialEq for CString

1.64.0 · Source§

impl PartialEq for FromVecWithNulError

1.64.0 · Source§

impl PartialEq for IntoStringError

1.64.0 · Source§

impl PartialEq for NulError

1.0.0 · Source§

impl PartialEq for origin_studio::fmt::Error

Source§

impl PartialEq for FormattingOptions

1.33.0 · Source§

impl PartialEq for PhantomPinned

Source§

impl PartialEq for Assume

1.0.0 · Source§

impl PartialEq for AddrParseError

1.0.0 · Source§

impl PartialEq for Ipv4Addr

1.0.0 · Source§

impl PartialEq for Ipv6Addr

1.0.0 · Source§

impl PartialEq for SocketAddrV4

1.0.0 · Source§

impl PartialEq for SocketAddrV6

1.0.0 · Source§

impl PartialEq for ParseFloatError

1.0.0 · Source§

impl PartialEq for ParseIntError

1.34.0 · Source§

impl PartialEq for TryFromIntError

1.0.0 · Source§

impl PartialEq for RangeFull

Source§

impl PartialEq for origin_studio::ptr::Alignment

1.0.0 · Source§

impl PartialEq for ParseBoolError

1.0.0 · Source§

impl PartialEq for Utf8Error

1.0.0 · Source§

impl PartialEq for FromUtf8Error

1.0.0 · Source§

impl PartialEq for String

1.3.0 · Source§

impl PartialEq for Duration

1.66.0 · Source§

impl PartialEq for TryFromFloatSecsError

Source§

impl PartialEq for ByteString

1.64.0 · Source§

impl PartialEq for CStr

1.69.0 · Source§

impl PartialEq for FromBytesUntilNulError

1.36.0 · Source§

impl PartialEq for RawWaker

1.36.0 · Source§

impl PartialEq for RawWakerVTable

Source§

impl PartialEq for DebugTypeSignature

Source§

impl PartialEq for DwoId

Source§

impl PartialEq for Encoding

Source§

impl PartialEq for LineEncoding

Source§

impl PartialEq for Register

Source§

impl PartialEq for DwAccess

Source§

impl PartialEq for DwAddr

Source§

impl PartialEq for DwAt

Source§

impl PartialEq for DwAte

Source§

impl PartialEq for DwCc

Source§

impl PartialEq for DwCfa

Source§

impl PartialEq for DwChildren

Source§

impl PartialEq for DwDefaulted

Source§

impl PartialEq for DwDs

Source§

impl PartialEq for DwDsc

Source§

impl PartialEq for DwEhPe

Source§

impl PartialEq for DwEnd

Source§

impl PartialEq for DwForm

Source§

impl PartialEq for DwId

Source§

impl PartialEq for DwIdx

Source§

impl PartialEq for DwInl

Source§

impl PartialEq for DwLang

Source§

impl PartialEq for DwLle

Source§

impl PartialEq for DwLnct

Source§

impl PartialEq for DwLne

Source§

impl PartialEq for DwLns

Source§

impl PartialEq for DwMacro

Source§

impl PartialEq for DwOp

Source§

impl PartialEq for DwOrd

Source§

impl PartialEq for DwRle

Source§

impl PartialEq for DwSect

Source§

impl PartialEq for DwSectV2

Source§

impl PartialEq for DwTag

Source§

impl PartialEq for DwUt

Source§

impl PartialEq for DwVirtuality

Source§

impl PartialEq for DwVis

Source§

impl PartialEq for BigEndian

Source§

impl PartialEq for LittleEndian

Source§

impl PartialEq for ArangeEntry

Source§

impl PartialEq for Augmentation

Source§

impl PartialEq for BaseAddresses

Source§

impl PartialEq for SectionBaseAddresses

Source§

impl PartialEq for UnitIndexSection

Source§

impl PartialEq for ReaderOffsetId

Source§

impl PartialEq for gimli::read::rnglists::Range

Source§

impl PartialEq for StoreOnHeap

Source§

impl PartialEq for __kernel_timespec

Source§

impl PartialEq for Thread

Source§

impl PartialEq for WaitTimeoutResult

Source§

impl PartialEq for CreateFlags

Source§

impl PartialEq for ReadFlags

Source§

impl PartialEq for WatchFlags

Source§

impl PartialEq for Access

Source§

impl PartialEq for AtFlags

Source§

impl PartialEq for FallocateFlags

Source§

impl PartialEq for MemfdFlags

Source§

impl PartialEq for Mode

Source§

impl PartialEq for OFlags

Source§

impl PartialEq for RenameFlags

Source§

impl PartialEq for ResolveFlags

Source§

impl PartialEq for SealFlags

Source§

impl PartialEq for StatVfsMountFlags

Source§

impl PartialEq for Errno

Source§

impl PartialEq for DupFlags

Source§

impl PartialEq for FdFlags

Source§

impl PartialEq for ReadWriteFlags

Source§

impl PartialEq for MapFlags

Source§

impl PartialEq for MlockAllFlags

Source§

impl PartialEq for MlockFlags

Source§

impl PartialEq for MprotectFlags

Source§

impl PartialEq for MremapFlags

Source§

impl PartialEq for MsyncFlags

Source§

impl PartialEq for ProtFlags

Source§

impl PartialEq for UserfaultfdFlags

Source§

impl PartialEq for Flags

Source§

impl PartialEq for WaitFlags

Source§

impl PartialEq for TimerfdFlags

Source§

impl PartialEq for TimerfdTimerFlags

Source§

impl PartialEq for IFlags

Source§

impl PartialEq for StatxAttributes

Source§

impl PartialEq for StatxFlags

Source§

impl PartialEq for XattrFlags

Source§

impl PartialEq for Pid

Source§

impl PartialEq for PidfdFlags

Source§

impl PartialEq for PidfdGetfdFlags

Source§

impl PartialEq for FloatingPointEmulationControl

Source§

impl PartialEq for FloatingPointExceptionMode

Source§

impl PartialEq for SpeculationFeatureControl

Source§

impl PartialEq for SpeculationFeatureState

Source§

impl PartialEq for UnalignedAccessControl

Source§

impl PartialEq for Rlimit

Source§

impl PartialEq for Flock

Source§

impl PartialEq for WaitIdOptions

Source§

impl PartialEq for WaitOptions

Source§

impl PartialEq for KernelSigactionFlags

Source§

impl PartialEq for Signal

Source§

impl PartialEq for WaitvFlags

Source§

impl PartialEq for Cpuid

Source§

impl PartialEq for CapabilityFlags

Source§

impl PartialEq for CapabilitySets

Source§

impl PartialEq for MembarrierQuery

Source§

impl PartialEq for CapabilitiesSecureBits

Source§

impl PartialEq for SVEVectorLengthConfig

Source§

impl PartialEq for TaggedAddressMode

Source§

impl PartialEq for CpuSet

Source§

impl PartialEq for ThreadNameSpaceType

Source§

impl PartialEq for UnshareFlags

Source§

impl PartialEq for Timespec

Source§

impl PartialEq for Gid

Source§

impl PartialEq for Uid

Source§

impl PartialEq for UnwindAction

Source§

impl PartialEq for UnwindReasonCode

1.16.0 · Source§

impl PartialEq<IpAddr> for Ipv4Addr

1.16.0 · Source§

impl PartialEq<IpAddr> for Ipv6Addr

1.16.0 · Source§

impl PartialEq<Ipv4Addr> for IpAddr

1.16.0 · Source§

impl PartialEq<Ipv6Addr> for IpAddr

Source§

impl<'a> PartialEq for Utf8Pattern<'a>

Source§

impl<'a> PartialEq for PhantomContravariantLifetime<'a>

Source§

impl<'a> PartialEq for PhantomCovariantLifetime<'a>

Source§

impl<'a> PartialEq for PhantomInvariantLifetime<'a>

1.10.0 · Source§

impl<'a> PartialEq for origin_studio::panic::Location<'a>

1.79.0 · Source§

impl<'a> PartialEq for Utf8Chunk<'a>

Source§

impl<'a> PartialEq<&'a ByteStr> for Cow<'a, str>

Source§

impl<'a> PartialEq<&'a ByteStr> for Cow<'a, ByteStr>

Source§

impl<'a> PartialEq<&'a ByteStr> for Cow<'a, [u8]>

Source§

impl<'a> PartialEq<&str> for ByteStr

Source§

impl<'a> PartialEq<&str> for ByteString

Source§

impl<'a> PartialEq<&ByteStr> for ByteString

Source§

impl<'a> PartialEq<&[u8]> for ByteStr

Source§

impl<'a> PartialEq<&[u8]> for ByteString

Source§

impl<'a> PartialEq<Cow<'_, str>> for ByteString

Source§

impl<'a> PartialEq<Cow<'_, ByteStr>> for ByteString

Source§

impl<'a> PartialEq<Cow<'_, [u8]>> for ByteString

Source§

impl<'a> PartialEq<Cow<'a, str>> for &'a ByteStr

Source§

impl<'a> PartialEq<Cow<'a, ByteStr>> for &'a ByteStr

Source§

impl<'a> PartialEq<Cow<'a, [u8]>> for &'a ByteStr

Source§

impl<'a> PartialEq<str> for ByteStr

Source§

impl<'a> PartialEq<str> for ByteString

Source§

impl<'a> PartialEq<ByteStr> for &str

Source§

impl<'a> PartialEq<ByteStr> for &[u8]

Source§

impl<'a> PartialEq<ByteStr> for str

Source§

impl<'a> PartialEq<ByteStr> for String

Source§

impl<'a> PartialEq<ByteStr> for Vec<u8>

Source§

impl<'a> PartialEq<ByteStr> for ByteString

Source§

impl<'a> PartialEq<ByteStr> for [u8]

Source§

impl<'a> PartialEq<String> for ByteStr

Source§

impl<'a> PartialEq<String> for ByteString

Source§

impl<'a> PartialEq<Vec<u8>> for ByteStr

Source§

impl<'a> PartialEq<Vec<u8>> for ByteString

Source§

impl<'a> PartialEq<ByteString> for &str

Source§

impl<'a> PartialEq<ByteString> for &ByteStr

Source§

impl<'a> PartialEq<ByteString> for &[u8]

Source§

impl<'a> PartialEq<ByteString> for Cow<'_, str>

Source§

impl<'a> PartialEq<ByteString> for Cow<'_, ByteStr>

Source§

impl<'a> PartialEq<ByteString> for Cow<'_, [u8]>

Source§

impl<'a> PartialEq<ByteString> for str

Source§

impl<'a> PartialEq<ByteString> for ByteStr

Source§

impl<'a> PartialEq<ByteString> for String

Source§

impl<'a> PartialEq<ByteString> for Vec<u8>

Source§

impl<'a> PartialEq<ByteString> for [u8]

Source§

impl<'a> PartialEq<[u8]> for ByteStr

Source§

impl<'a> PartialEq<[u8]> for ByteString

1.0.0 · Source§

impl<'a, 'b> PartialEq<&'a str> for String

1.0.0 · Source§

impl<'a, 'b> PartialEq<&'b str> for Cow<'a, str>

1.0.0 · Source§

impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str

1.0.0 · Source§

impl<'a, 'b> PartialEq<Cow<'a, str>> for str

1.0.0 · Source§

impl<'a, 'b> PartialEq<Cow<'a, str>> for String

1.0.0 · Source§

impl<'a, 'b> PartialEq<str> for Cow<'a, str>

1.0.0 · Source§

impl<'a, 'b> PartialEq<str> for String

1.0.0 · Source§

impl<'a, 'b> PartialEq<String> for &'a str

1.0.0 · Source§

impl<'a, 'b> PartialEq<String> for Cow<'a, str>

1.0.0 · Source§

impl<'a, 'b> PartialEq<String> for str

1.0.0 · Source§

impl<'a, 'b, B, C> PartialEq<Cow<'b, C>> for Cow<'a, B>
where B: PartialEq<C> + ToOwned + ?Sized, C: ToOwned + ?Sized,

Source§

impl<'bases, Section, R> PartialEq for CieOrFde<'bases, Section, R>
where Section: PartialEq + UnwindSection<R>, R: PartialEq + Reader,

Source§

impl<'bases, Section, R> PartialEq for PartialFrameDescriptionEntry<'bases, Section, R>
where Section: PartialEq + UnwindSection<R>, R: PartialEq + Reader, <R as Reader>::Offset: PartialEq, <Section as UnwindSection<R>>::Offset: PartialEq,

Source§

impl<'input, Endian> PartialEq for EndianSlice<'input, Endian>
where Endian: PartialEq + Endianity,

1.0.0 · Source§

impl<A, B> PartialEq<&B> for &A
where A: PartialEq<B> + ?Sized, B: ?Sized,

1.0.0 · Source§

impl<A, B> PartialEq<&B> for &mut A
where A: PartialEq<B> + ?Sized, B: ?Sized,

1.0.0 · Source§

impl<A, B> PartialEq<&mut B> for &A
where A: PartialEq<B> + ?Sized, B: ?Sized,

1.0.0 · Source§

impl<A, B> PartialEq<&mut B> for &mut A
where A: PartialEq<B> + ?Sized, B: ?Sized,

1.55.0 · Source§

impl<B, C> PartialEq for ControlFlow<B, C>
where B: PartialEq, C: PartialEq,

Source§

impl<Dyn> PartialEq for DynMetadata<Dyn>
where Dyn: ?Sized,

1.4.0 · Source§

impl<F> PartialEq for F
where F: FnPtr,

1.29.0 · Source§

impl<H> PartialEq for BuildHasherDefault<H>

1.0.0 · Source§

impl<Idx> PartialEq for origin_studio::ops::Range<Idx>
where Idx: PartialEq,

1.0.0 · Source§

impl<Idx> PartialEq for origin_studio::ops::RangeFrom<Idx>
where Idx: PartialEq,

1.26.0 · Source§

impl<Idx> PartialEq for origin_studio::ops::RangeInclusive<Idx>
where Idx: PartialEq,

1.0.0 · Source§

impl<Idx> PartialEq for RangeTo<Idx>
where Idx: PartialEq,

1.26.0 · Source§

impl<Idx> PartialEq for RangeToInclusive<Idx>
where Idx: PartialEq,

Source§

impl<Idx> PartialEq for origin_studio::range::Range<Idx>
where Idx: PartialEq,

Source§

impl<Idx> PartialEq for origin_studio::range::RangeFrom<Idx>
where Idx: PartialEq,

Source§

impl<Idx> PartialEq for origin_studio::range::RangeInclusive<Idx>
where Idx: PartialEq,

1.0.0 · Source§

impl<K, V, A> PartialEq for BTreeMap<K, V, A>
where K: PartialEq, V: PartialEq, A: Allocator + Clone,

1.41.0 · Source§

impl<Ptr, Q> PartialEq<Pin<Q>> for Pin<Ptr>
where Ptr: Deref, Q: Deref, <Ptr as Deref>::Target: PartialEq<<Q as Deref>::Target>,

Source§

impl<R> PartialEq for EvaluationResult<R>
where R: PartialEq + Reader, <R as Reader>::Offset: PartialEq,

Source§

impl<R> PartialEq for DebugFrame<R>
where R: PartialEq + Reader,

Source§

impl<R> PartialEq for EhFrame<R>
where R: PartialEq + Reader,

Source§

impl<R> PartialEq for EhFrameHdr<R>
where R: PartialEq + Reader,

Source§

impl<R> PartialEq for LocationListEntry<R>
where R: PartialEq + Reader,

Source§

impl<R> PartialEq for Expression<R>
where R: PartialEq + Reader,

Source§

impl<R, Offset> PartialEq for gimli::read::op::Location<R, Offset>
where R: PartialEq + Reader<Offset = Offset>, Offset: PartialEq + ReaderOffset,

Source§

impl<R, Offset> PartialEq for Operation<R, Offset>
where R: PartialEq + Reader<Offset = Offset>, Offset: PartialEq + ReaderOffset,

Source§

impl<R, Offset> PartialEq for ArangeHeader<R, Offset>
where R: PartialEq + Reader<Offset = Offset>, Offset: PartialEq + ReaderOffset,

Source§

impl<R, Offset> PartialEq for CommonInformationEntry<R, Offset>
where R: PartialEq + Reader<Offset = Offset>, Offset: PartialEq + ReaderOffset,

Source§

impl<R, Offset> PartialEq for FrameDescriptionEntry<R, Offset>
where R: PartialEq + Reader<Offset = Offset>, Offset: PartialEq + ReaderOffset,

Source§

impl<R, Offset> PartialEq for Piece<R, Offset>
where R: PartialEq + Reader<Offset = Offset>, Offset: PartialEq + ReaderOffset,

Source§

impl<Storage> PartialEq for __BindgenBitfieldUnit<Storage>
where Storage: PartialEq,

1.17.0 · Source§

impl<T> PartialEq for Bound<T>
where T: PartialEq,

1.0.0 · Source§

impl<T> PartialEq for Option<T>
where T: PartialEq,

1.36.0 · Source§

impl<T> PartialEq for Poll<T>
where T: PartialEq,

Source§

impl<T> PartialEq for UnitSectionOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for CallFrameInstruction<T>

Source§

impl<T> PartialEq for CfaRule<T>

Source§

impl<T> PartialEq for RegisterRule<T>

Source§

impl<T> PartialEq for DieReference<T>
where T: PartialEq,

1.0.0 · Source§

impl<T> PartialEq for *const T
where T: ?Sized,

Pointer equality is by address, as produced by the <*const T>::addr method.

1.0.0 · Source§

impl<T> PartialEq for *mut T
where T: ?Sized,

Pointer equality is by address, as produced by the <*mut T>::addr method.

1.0.0 · Source§

impl<T> PartialEq for (T₁, T₂, …, Tₙ)
where T: PartialEq + ?Sized,

This trait is implemented for tuples up to twelve items long.

1.0.0 · Source§

impl<T> PartialEq for Cell<T>
where T: PartialEq + Copy,

1.70.0 · Source§

impl<T> PartialEq for OnceCell<T>
where T: PartialEq,

1.0.0 · Source§

impl<T> PartialEq for RefCell<T>
where T: PartialEq + ?Sized,

Source§

impl<T> PartialEq for PhantomContravariant<T>
where T: ?Sized,

Source§

impl<T> PartialEq for PhantomCovariant<T>
where T: ?Sized,

1.0.0 · Source§

impl<T> PartialEq for PhantomData<T>
where T: ?Sized,

Source§

impl<T> PartialEq for PhantomInvariant<T>
where T: ?Sized,

1.21.0 · Source§

impl<T> PartialEq for Discriminant<T>

1.20.0 · Source§

impl<T> PartialEq for ManuallyDrop<T>
where T: PartialEq + ?Sized,

1.28.0 · Source§

impl<T> PartialEq for NonZero<T>

1.74.0 · Source§

impl<T> PartialEq for Saturating<T>
where T: PartialEq,

1.0.0 · Source§

impl<T> PartialEq for Wrapping<T>
where T: PartialEq,

1.25.0 · Source§

impl<T> PartialEq for NonNull<T>
where T: ?Sized,

Source§

impl<T> PartialEq for DebugAbbrevOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugAddrBase<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugAddrIndex<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugArangesOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugFrameOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugInfoOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugLineOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugLineStrOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugLocListsBase<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugLocListsIndex<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugMacinfoOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugMacroOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugRngListsBase<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugRngListsIndex<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugStrOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugStrOffsetsBase<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugStrOffsetsIndex<T>
where T: PartialEq,

Source§

impl<T> PartialEq for DebugTypesOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for EhFrameOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for LocationListsOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for RangeListsOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for RawRangeListsOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for UnwindExpression<T>

Source§

impl<T> PartialEq for UnitOffset<T>
where T: PartialEq,

Source§

impl<T> PartialEq for OnceLock<T>
where T: PartialEq,

1.19.0 · Source§

impl<T> PartialEq for Reverse<T>
where T: PartialEq,

1.0.0 · Source§

impl<T, A> PartialEq for Box<T, A>
where T: PartialEq + ?Sized, A: Allocator,

1.0.0 · Source§

impl<T, A> PartialEq for BTreeSet<T, A>
where T: PartialEq, A: Allocator + Clone,

1.0.0 · Source§

impl<T, A> PartialEq for LinkedList<T, A>
where T: PartialEq, A: Allocator,

1.0.0 · Source§

impl<T, A> PartialEq for VecDeque<T, A>
where T: PartialEq, A: Allocator,

1.0.0 · Source§

impl<T, A> PartialEq for Rc<T, A>
where T: PartialEq + ?Sized, A: Allocator,

Source§

impl<T, A> PartialEq for UniqueRc<T, A>
where T: PartialEq + ?Sized, A: Allocator,

1.0.0 · Source§

impl<T, A> PartialEq for Arc<T, A>
where T: PartialEq + ?Sized, A: Allocator,

1.0.0 · Source§

impl<T, E> PartialEq for Result<T, E>
where T: PartialEq, E: PartialEq,

Source§

impl<T, S> PartialEq for UnwindContext<T, S>

Source§

impl<T, S> PartialEq for UnwindTableRow<T, S>

1.0.0 · Source§

impl<T, U> PartialEq<&[U]> for Cow<'_, [T]>
where T: PartialEq<U> + Clone,

1.0.0 · Source§

impl<T, U> PartialEq<&mut [U]> for Cow<'_, [T]>
where T: PartialEq<U> + Clone,

1.0.0 · Source§

impl<T, U> PartialEq<[U]> for [T]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where A1: Allocator, A2: Allocator, T: PartialEq<U>,

1.17.0 · Source§

impl<T, U, A> PartialEq<&[U]> for VecDeque<T, A>
where A: Allocator, T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where A: Allocator, T: PartialEq<U>,

1.17.0 · Source§

impl<T, U, A> PartialEq<&mut [U]> for VecDeque<T, A>
where A: Allocator, T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where A: Allocator, T: PartialEq<U>,

1.48.0 · Source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where A: Allocator, T: PartialEq<U>,

1.46.0 · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where A: Allocator, T: PartialEq<U>,

1.46.0 · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for &mut [T]
where A: Allocator, T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for Cow<'_, [T]>
where A: Allocator, T: PartialEq<U> + Clone,

1.48.0 · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for [T]
where A: Allocator, T: PartialEq<U>,

1.17.0 · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for VecDeque<T, A>
where A: Allocator, T: PartialEq<U>,

1.17.0 · Source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for VecDeque<T, A>
where A: Allocator, T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where A: Allocator, T: PartialEq<U>,

1.17.0 · Source§

impl<T, U, A, const N: usize> PartialEq<&mut [U; N]> for VecDeque<T, A>
where A: Allocator, T: PartialEq<U>,

1.17.0 · Source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for VecDeque<T, A>
where A: Allocator, T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where A: Allocator, T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for &[T]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for &mut [T]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T]
where T: PartialEq<U>,

1.0.0 · Source§

impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
where T: PartialEq<U>,

Source§

impl<T, const N: usize> PartialEq for Mask<T, N>

Source§

impl<T, const N: usize> PartialEq for Simd<T, N>

Source§

impl<Y, R> PartialEq for CoroutineState<Y, R>
where Y: PartialEq, R: PartialEq,

Source§

impl<const N: usize> PartialEq<&[u8; N]> for ByteStr

Source§

impl<const N: usize> PartialEq<&[u8; N]> for ByteString

Source§

impl<const N: usize> PartialEq<ByteStr> for &[u8; N]

Source§

impl<const N: usize> PartialEq<ByteStr> for [u8; N]

Source§

impl<const N: usize> PartialEq<ByteString> for &[u8; N]

Source§

impl<const N: usize> PartialEq<ByteString> for [u8; N]

Source§

impl<const N: usize> PartialEq<[u8; N]> for ByteStr

Source§

impl<const N: usize> PartialEq<[u8; N]> for ByteString