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>
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 PrivateInput
impl PartialEq for Dictionary
impl PartialEq for OffsetValue
impl PartialEq for BuiltinName
impl PartialEq for MathError
impl PartialEq for ApUpdate
impl PartialEq for FpUpdate
impl PartialEq for Op1Addr
impl PartialEq for Opcode
impl PartialEq for PcUpdate
impl PartialEq for Register
impl PartialEq for Res
impl PartialEq for LayoutName
impl PartialEq for MaybeRelocatable
impl PartialEq for CairoPieValidationError
impl PartialEq for ExecScopeError
impl PartialEq for InsufficientAllocatedCellsError
impl PartialEq for MemoryError
impl PartialEq for RunnerError
impl PartialEq for TraceError
impl PartialEq for BuiltinAdditionalData
impl PartialEq for CairoArg
impl PartialEq for RunnerMode
impl PartialEq for cairo_vm::with_std::cmp::Ordering
impl PartialEq for Infallible
impl PartialEq for cairo_vm::with_std::fmt::Alignment
impl PartialEq for FpCategory
impl PartialEq for IntErrorKind
impl PartialEq for SearchStep
impl PartialEq for cairo_vm::with_std::sync::atomic::Ordering
impl PartialEq for RecvTimeoutError
impl PartialEq for TryRecvError
impl PartialEq for TryReserveErrorKind
impl PartialEq for AsciiChar
impl PartialEq for IpAddr
impl PartialEq for Ipv6MulticastScope
impl PartialEq for SocketAddr
impl PartialEq for BacktraceStatus
impl PartialEq for VarError
impl PartialEq for SeekFrom
impl PartialEq for std::io::error::ErrorKind
impl PartialEq for Shutdown
impl PartialEq for BacktraceStyle
impl PartialEq for _Unwind_Action
impl PartialEq for _Unwind_Reason_Code
impl PartialEq for ark_ff::fields::sqrt::LegendreSymbol
impl PartialEq for Compress
impl PartialEq for Validate
impl PartialEq for ark_std::io::error::ErrorKind
impl PartialEq for base64ct::errors::Error
impl PartialEq for LineEnding
impl PartialEq for AllowedEnumVariants
impl PartialEq for IntegerType
impl PartialEq for BigEndian
impl PartialEq for LittleEndian
impl PartialEq for Action
impl PartialEq for bzip2::mem::Error
impl PartialEq for bzip2::mem::Status
impl PartialEq for FlushCompress
impl PartialEq for FlushDecompress
impl PartialEq for flate2::mem::Status
impl PartialEq for hashbrown::TryReserveError
impl PartialEq for FromHexError
impl PartialEq for lambdaworks_math::elliptic_curve::short_weierstrass::point::Endianness
impl PartialEq for PointFormat
impl PartialEq for EllipticCurveError
impl PartialEq for ByteConversionError
impl PartialEq for CreationError
impl PartialEq for DeserializationError
impl PartialEq for PairingError
impl PartialEq for lambdaworks_math::field::traits::LegendreSymbol
impl PartialEq for CompressionStrategy
impl PartialEq for TDEFLFlush
impl PartialEq for TDEFLStatus
impl PartialEq for CompressionLevel
impl PartialEq for DataFormat
impl PartialEq for MZError
impl PartialEq for MZFlush
impl PartialEq for MZStatus
impl PartialEq for TINFLStatus
impl PartialEq for nom::error::ErrorKind
impl PartialEq for Needed
impl PartialEq for nom::number::Endianness
impl PartialEq for CompareResult
impl PartialEq for Sign
impl PartialEq for Primality
impl PartialEq for Encoding
impl PartialEq for password_hash::errors::Error
impl PartialEq for InvalidValue
impl PartialEq for Algorithm
impl PartialEq for BernoulliError
impl PartialEq for WeightedError
impl PartialEq for IndexVec
impl PartialEq for RoundingStrategy
impl PartialEq for rust_decimal::error::Error
impl PartialEq for Category
impl PartialEq for serde_json::value::Value
impl PartialEq for CurveError
impl PartialEq for Month
impl PartialEq for Weekday
impl PartialEq for CompressionMethod
impl PartialEq for CParameter
impl PartialEq for ZSTD_EndDirective
impl PartialEq for ZSTD_ResetDirective
impl PartialEq for ZSTD_cParameter
impl PartialEq for ZSTD_dParameter
impl PartialEq for ZSTD_strategy
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 AirPrivateInput
impl PartialEq for AirPrivateInputSerializable
impl PartialEq for ModInput
impl PartialEq for ModInputInstance
impl PartialEq for ModInputMemoryVars
impl PartialEq for PrivateInputEcOp
impl PartialEq for PrivateInputKeccakState
impl PartialEq for PrivateInputPair
impl PartialEq for PrivateInputPoseidonState
impl PartialEq for PrivateInputSignature
impl PartialEq for PrivateInputValue
impl PartialEq for SignatureInput
impl PartialEq for MemorySegmentAddresses
impl PartialEq for PublicMemoryEntry
impl PartialEq for DictManager
impl PartialEq for DictTracker
impl PartialEq for HintReference
impl PartialEq for ApTracking
impl PartialEq for Attribute
impl PartialEq for DebugInfo
impl PartialEq for FlowTrackingData
impl PartialEq for HintLocation
impl PartialEq for HintParams
impl PartialEq for Identifier
impl PartialEq for InputFile
impl PartialEq for InstructionLocation
impl PartialEq for cairo_vm::serde::deserialize_program::Location
impl PartialEq for Member
impl PartialEq for Reference
impl PartialEq for ReferenceManager
impl PartialEq for ValueAddress
impl PartialEq for Felt
impl PartialEq for Instruction
impl PartialEq for Program
impl PartialEq for Relocatable
impl PartialEq for OutputBuiltinState
impl PartialEq for CairoPie
impl PartialEq for CairoPieAdditionalData
impl PartialEq for CairoPieMemory
impl PartialEq for CairoPieMetadata
impl PartialEq for CairoPieVersion
impl PartialEq for OutputBuiltinAdditionalData
impl PartialEq for PublicMemoryPage
impl PartialEq for cairo_vm::vm::runners::cairo_pie::SegmentInfo
impl PartialEq for StrippedProgram
impl PartialEq for ExecutionResources
impl PartialEq for RunResources
impl PartialEq for cairo_vm::vm::runners::cairo_runner::SegmentInfo
impl PartialEq for RelocatedTraceEntry
impl PartialEq for TraceEntry
impl PartialEq for Operands
impl PartialEq for OperandsAddresses
impl PartialEq for cairo_vm::with_std::alloc::AllocError
impl PartialEq for Layout
impl PartialEq for LayoutError
impl PartialEq for TypeId
impl PartialEq for cairo_vm::with_std::fmt::Error
impl PartialEq for PhantomPinned
impl PartialEq for Assume
impl PartialEq for ParseFloatError
impl PartialEq for cairo_vm::with_std::num::ParseIntError
impl PartialEq for cairo_vm::with_std::num::TryFromIntError
impl PartialEq for RangeFull
impl PartialEq for cairo_vm::with_std::ptr::Alignment
impl PartialEq for ParseBoolError
impl PartialEq for Utf8Error
impl PartialEq for FromUtf8Error
impl PartialEq for RecvError
impl PartialEq for WaitTimeoutResult
impl PartialEq for cairo_vm::with_std::time::Duration
impl PartialEq for TryFromFloatSecsError
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 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 RawWaker
impl PartialEq for RawWakerVTable
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 std::process::Output
impl PartialEq for AccessError
impl PartialEq for ThreadId
impl PartialEq for std::time::Instant
impl PartialEq for SystemTime
impl PartialEq for allocator_api2::stable::alloc::AllocError
impl PartialEq for EmptyFlags
impl PartialEq for Base64Bcrypt
impl PartialEq for Base64Crypt
impl PartialEq for Base64ShaCrypt
impl PartialEq for Base64
impl PartialEq for Base64Unpadded
impl PartialEq for Base64Url
impl PartialEq for Base64UrlUnpadded
impl PartialEq for InvalidEncodingError
impl PartialEq for InvalidLengthError
impl PartialEq for Lsb0
impl PartialEq for Msb0
impl PartialEq for block_buffer::Error
impl PartialEq for Limb
impl PartialEq for Reciprocal
impl PartialEq for InvalidLength
impl PartialEq for deranged::ParseIntError
impl PartialEq for deranged::TryFromIntError
impl PartialEq for MacError
impl PartialEq for InvalidBufferSize
impl PartialEq for GzHeader
impl PartialEq for Compression
impl PartialEq for getrandom::error::Error
impl PartialEq for MontgomeryConfigBabybear31PrimeField
impl PartialEq for MontgomeryConfigU64GoldilocksPrimeField
impl PartialEq for MontgomeryConfigMersenne31PrimeField
impl PartialEq for Mersenne31Field
impl PartialEq for P448GoldilocksPrimeField
impl PartialEq for U56x8
impl PartialEq for MontgomeryConfigPallas255PrimeField
impl PartialEq for Goldilocks64Field
impl PartialEq for MontgomeryConfigVesta255PrimeField
impl PartialEq for StreamResult
impl PartialEq for num_bigint::bigint::BigInt
impl PartialEq for BigUint
impl PartialEq for ParseBigIntError
impl PartialEq for udouble
impl PartialEq for password_hash::output::Output
impl PartialEq for ParamsString
impl PartialEq for SaltString
impl PartialEq for Params
impl PartialEq for Pbkdf2
impl PartialEq for u32x4_generic
impl PartialEq for u64x2_generic
impl PartialEq for u128x1_generic
impl PartialEq for vec256_storage
impl PartialEq for vec512_storage
impl PartialEq for Bernoulli
impl PartialEq for StepRng
impl PartialEq for SmallRng
impl PartialEq for StdRng
impl PartialEq for ChaCha8Core
impl PartialEq for ChaCha8Rng
impl PartialEq for ChaCha12Core
impl PartialEq for ChaCha12Rng
impl PartialEq for ChaCha20Core
impl PartialEq for ChaCha20Rng
impl PartialEq for Decimal
impl PartialEq for IgnoredAny
impl PartialEq for serde::de::value::Error
impl PartialEq for Map<String, Value>
impl PartialEq for Number
impl PartialEq for starknet_curve::ec_point::AffinePoint
impl PartialEq for starknet_curve::ec_point::ProjectivePoint
impl PartialEq for starknet_ff::FieldElement
impl PartialEq for starknet_types_core::curve::affine_point::AffinePoint
impl PartialEq for starknet_types_core::curve::projective_point::ProjectivePoint
impl PartialEq for NonZeroFelt
impl PartialEq for Date
impl PartialEq for time::duration::Duration
impl PartialEq for ComponentRange
impl PartialEq for ConversionRange
impl PartialEq for DifferentVariant
impl PartialEq for InvalidVariant
impl PartialEq for time::instant::Instant
impl PartialEq for OffsetDateTime
impl PartialEq for PrimitiveDateTime
impl PartialEq for Time
impl PartialEq for UtcOffset
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 Const
impl PartialEq for Mut
impl PartialEq for NullPtrError
impl PartialEq for String
impl PartialEq for vec128_storage
impl PartialEq<&str> for serde_json::value::Value
impl PartialEq<&str> for OsString
impl PartialEq<IpAddr> for Ipv4Addr
impl PartialEq<IpAddr> for Ipv6Addr
impl PartialEq<Value> for &str
impl PartialEq<Value> for bool
impl PartialEq<Value> for f32
impl PartialEq<Value> for f64
impl PartialEq<Value> for i8
impl PartialEq<Value> for i16
impl PartialEq<Value> for i32
impl PartialEq<Value> for i64
impl PartialEq<Value> for isize
impl PartialEq<Value> for str
impl PartialEq<Value> for u8
impl PartialEq<Value> for u16
impl PartialEq<Value> for u32
impl PartialEq<Value> for u64
impl PartialEq<Value> for usize
impl PartialEq<Value> for String
impl PartialEq<bool> for serde_json::value::Value
impl PartialEq<f32> for serde_json::value::Value
impl PartialEq<f64> for serde_json::value::Value
impl PartialEq<i8> for serde_json::value::Value
impl PartialEq<i16> for serde_json::value::Value
impl PartialEq<i32> for serde_json::value::Value
impl PartialEq<i64> for serde_json::value::Value
impl PartialEq<isize> for serde_json::value::Value
impl PartialEq<str> for serde_json::value::Value
impl PartialEq<str> for OsStr
impl PartialEq<str> for OsString
impl PartialEq<u8> for serde_json::value::Value
impl PartialEq<u16> for serde_json::value::Value
impl PartialEq<u32> for serde_json::value::Value
impl PartialEq<u64> for serde_json::value::Value
impl PartialEq<usize> for serde_json::value::Value
impl PartialEq<Duration> for time::duration::Duration
impl PartialEq<Ipv4Addr> for IpAddr
impl PartialEq<Ipv6Addr> for IpAddr
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<Instant> for time::instant::Instant
impl PartialEq<SystemTime> for OffsetDateTime
impl PartialEq<Duration> for cairo_vm::with_std::time::Duration
impl PartialEq<Instant> for std::time::Instant
impl PartialEq<OffsetDateTime> for SystemTime
impl PartialEq<String> for serde_json::value::Value
impl<'a> PartialEq for Component<'a>
impl<'a> PartialEq for Prefix<'a>
impl<'a> PartialEq for Unexpected<'a>
impl<'a> PartialEq for Utf8Chunk<'a>
impl<'a> PartialEq for core::panic::location::Location<'a>
impl<'a> PartialEq for Components<'a>
impl<'a> PartialEq for PrefixComponent<'a>
impl<'a> PartialEq for Ident<'a>
impl<'a> PartialEq for Salt<'a>
impl<'a> PartialEq for PasswordHash<'a>
impl<'a> PartialEq for password_hash::value::Value<'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<bool> for &'a serde_json::value::Value
impl<'a> PartialEq<bool> for &'a mut serde_json::value::Value
impl<'a> PartialEq<f32> for &'a serde_json::value::Value
impl<'a> PartialEq<f32> for &'a mut serde_json::value::Value
impl<'a> PartialEq<f64> for &'a serde_json::value::Value
impl<'a> PartialEq<f64> for &'a mut serde_json::value::Value
impl<'a> PartialEq<i8> for &'a serde_json::value::Value
impl<'a> PartialEq<i8> for &'a mut serde_json::value::Value
impl<'a> PartialEq<i16> for &'a serde_json::value::Value
impl<'a> PartialEq<i16> for &'a mut serde_json::value::Value
impl<'a> PartialEq<i32> for &'a serde_json::value::Value
impl<'a> PartialEq<i32> for &'a mut serde_json::value::Value
impl<'a> PartialEq<i64> for &'a serde_json::value::Value
impl<'a> PartialEq<i64> for &'a mut serde_json::value::Value
impl<'a> PartialEq<isize> for &'a serde_json::value::Value
impl<'a> PartialEq<isize> for &'a mut serde_json::value::Value
impl<'a> PartialEq<u8> for &'a serde_json::value::Value
impl<'a> PartialEq<u8> for &'a mut serde_json::value::Value
impl<'a> PartialEq<u16> for &'a serde_json::value::Value
impl<'a> PartialEq<u16> for &'a mut serde_json::value::Value
impl<'a> PartialEq<u32> for &'a serde_json::value::Value
impl<'a> PartialEq<u32> for &'a mut serde_json::value::Value
impl<'a> PartialEq<u64> for &'a serde_json::value::Value
impl<'a> PartialEq<u64> for &'a mut serde_json::value::Value
impl<'a> PartialEq<usize> for &'a serde_json::value::Value
impl<'a> PartialEq<usize> for &'a mut serde_json::value::Value
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<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> PartialEq<String> for &'a str
impl<'a, 'b> PartialEq<String> for Cow<'a, str>
impl<'a, 'b> PartialEq<String> for str
impl<'a, 'b, B, C> PartialEq<Cow<'b, C>> for Cow<'a, B>
impl<'a, T, O> PartialEq for IterOnes<'a, T, O>
impl<'a, T, O> PartialEq for IterZeros<'a, T, O>
impl<A> PartialEq for ExtendedGcd<A>where
A: PartialEq,
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<A, O, Rhs> PartialEq<Rhs> for BitArray<A, O>
impl<B, C> PartialEq for ControlFlow<B, C>
impl<Dyn> PartialEq for DynMetadata<Dyn>where
Dyn: ?Sized,
impl<E> PartialEq for Err<E>where
E: PartialEq,
impl<E> PartialEq for EdwardsProjectivePoint<E>where
E: IsEllipticCurve,
impl<E> PartialEq for MontgomeryProjectivePoint<E>where
E: IsEllipticCurve,
impl<E> PartialEq for lambdaworks_math::elliptic_curve::point::ProjectivePoint<E>where
E: IsEllipticCurve,
impl<E> PartialEq for ShortWeierstrassProjectivePoint<E>where
E: IsEllipticCurve,
impl<F> PartialEq for lambdaworks_math::field::element::FieldElement<F>where
F: IsField,
Equality operator overloading for field elements
impl<F> PartialEq for DenseMultilinearPolynomial<F>
impl<F> PartialEq for Fwhere
F: FnPtr,
impl<F, T> PartialEq for CubicExtensionField<F, T>
impl<F, T> PartialEq for QuadraticExtensionField<F, T>
impl<FE> PartialEq for Polynomial<FE>where
FE: PartialEq,
impl<G1Point, G2Point> PartialEq for StructuredReferenceString<G1Point, G2Point>
impl<H> PartialEq for BuildHasherDefault<H>
impl<I> PartialEq for nom::error::Error<I>where
I: PartialEq,
impl<Idx> PartialEq for cairo_vm::with_std::ops::Range<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for cairo_vm::with_std::ops::RangeFrom<Idx>where
Idx: PartialEq,
impl<Idx> PartialEq for cairo_vm::with_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<Inner> PartialEq for Frozen<Inner>where
Inner: PartialEq + Mutability,
impl<K, V, A> PartialEq for BTreeMap<K, V, A>
impl<K, V, S> PartialEq for cairo_vm::with_std::collections::HashMap<K, V, S>
impl<K, V, S, A> PartialEq for hashbrown::map::HashMap<K, V, S, A>
impl<L, R> PartialEq for Either<L, R>
impl<M1, M2, O1, O2, T1, T2> PartialEq<BitRef<'_, M2, T2, O2>> for BitRef<'_, M1, T1, O1>
impl<M1, M2, O, T1, T2> PartialEq<BitPtrRange<M2, T2, O>> for BitPtrRange<M1, T1, O>
impl<M1, M2, T1, T2> PartialEq<Address<M2, T2>> for Address<M1, T1>where
M1: Mutability,
M2: Mutability,
impl<M1, M2, T1, T2, O> PartialEq<BitPtr<M2, T2, O>> for BitPtr<M1, T1, O>
impl<M, T, O> PartialEq<&bool> for BitRef<'_, M, T, O>
impl<M, T, O> PartialEq<bool> for BitRef<'_, M, T, O>
impl<M, T, O> PartialEq<BitRef<'_, M, T, O>> for &bool
impl<M, T, O> PartialEq<BitRef<'_, M, T, O>> for bool
impl<MOD, const LIMBS: usize> PartialEq for Residue<MOD, LIMBS>where
MOD: PartialEq + ResidueParams<LIMBS>,
impl<O1, A, O2, T> PartialEq<BitArray<A, O2>> for BitSlice<T, O1>
impl<O1, O2, T1, T2> PartialEq<BitBox<T2, O2>> for &BitSlice<T1, O1>
impl<O1, O2, T1, T2> PartialEq<BitBox<T2, O2>> for &mut BitSlice<T1, O1>
impl<O1, O2, T1, T2> PartialEq<BitBox<T2, O2>> for BitSlice<T1, O1>
impl<P> PartialEq for CubicExtField<P>where
P: CubicExtConfig,
impl<P> PartialEq for QuadExtField<P>where
P: QuadExtConfig,
impl<P, const N: usize> PartialEq for Fp<P, N>where
P: FpConfig<N>,
impl<Ptr, Q> PartialEq<Pin<Q>> for Pin<Ptr>
impl<R> PartialEq for BitEnd<R>where
R: PartialEq + BitRegister,
impl<R> PartialEq for BitIdx<R>where
R: PartialEq + BitRegister,
impl<R> PartialEq for BitIdxError<R>where
R: PartialEq + BitRegister,
impl<R> PartialEq for BitMask<R>where
R: PartialEq + BitRegister,
impl<R> PartialEq for BitPos<R>where
R: PartialEq + BitRegister,
impl<R> PartialEq for BitSel<R>where
R: PartialEq + BitRegister,
impl<T1, T2, O1, O2> PartialEq<&BitSlice<T2, O2>> for BitSlice<T1, O1>
impl<T1, T2, O1, O2> PartialEq<&mut BitSlice<T2, O2>> for BitSlice<T1, O1>
impl<T1, T2, O1, O2> PartialEq<BitSlice<T2, O2>> for &BitSlice<T1, O1>
impl<T1, T2, O1, O2> PartialEq<BitSlice<T2, O2>> for &mut BitSlice<T1, O1>
impl<T1, T2, O1, O2> PartialEq<BitSlice<T2, O2>> for BitSlice<T1, O1>
Tests if two BitSlice
s are semantically — not representationally — equal.
It is valid to compare slices of different ordering or memory types.
The equality condition requires that they have the same length and that at each index, the two slices have the same bit value.
impl<T1, T2, O1, O2> PartialEq<BitVec<T2, O2>> for &BitSlice<T1, O1>
impl<T1, T2, O1, O2> PartialEq<BitVec<T2, O2>> for &mut BitSlice<T1, O1>
impl<T1, T2, O1, O2> PartialEq<BitVec<T2, O2>> for BitSlice<T1, O1>
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 BitPtrError<T>
impl<T> PartialEq for BitSpanError<T>
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.