Trait frame_support::dispatch::PartialEq 1.0.0[−][src]
pub trait PartialEq<Rhs = Self> where
Rhs: ?Sized, { fn eq(&self, other: &Rhs) -> bool; fn ne(&self, other: &Rhs) -> bool { ... } }
Expand description
Trait for equality comparisons which are partial equivalence relations.
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
.
Implementations must ensure that eq
and ne
are consistent with each other:
a != b
if and only if!(a == b)
(ensured by the default implementation).
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, each variant is equal to itself
and not equal to the other variants.
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
Implementations on Foreign Types
1.26.0[src]impl<Idx> PartialEq<RangeToInclusive<Idx>> for RangeToInclusive<Idx> where
Idx: PartialEq<Idx>,
impl<Idx> PartialEq<RangeToInclusive<Idx>> for RangeToInclusive<Idx> where
Idx: PartialEq<Idx>,
1.26.0[src]impl<Idx> PartialEq<RangeInclusive<Idx>> for RangeInclusive<Idx> where
Idx: PartialEq<Idx>,
impl<Idx> PartialEq<RangeInclusive<Idx>> for RangeInclusive<Idx> where
Idx: PartialEq<Idx>,
impl<Y, R> PartialEq<GeneratorState<Y, R>> for GeneratorState<Y, R> where
R: PartialEq<R>,
Y: PartialEq<Y>,
impl<Y, R> PartialEq<GeneratorState<Y, R>> for GeneratorState<Y, R> where
R: PartialEq<R>,
Y: PartialEq<Y>,
impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L) where
C: PartialEq<C>,
I: PartialEq<I>,
A: PartialEq<A>,
K: PartialEq<K>,
F: PartialEq<F>,
E: PartialEq<E>,
H: PartialEq<H>,
B: PartialEq<B>,
D: PartialEq<D>,
G: PartialEq<G>,
J: PartialEq<J>,
L: PartialEq<L> + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialEq<(A, B, C, D, E, F, G, H, I, J, K, L)> for (A, B, C, D, E, F, G, H, I, J, K, L) where
C: PartialEq<C>,
I: PartialEq<I>,
A: PartialEq<A>,
K: PartialEq<K>,
F: PartialEq<F>,
E: PartialEq<E>,
H: PartialEq<H>,
B: PartialEq<B>,
D: PartialEq<D>,
G: PartialEq<G>,
J: PartialEq<J>,
L: PartialEq<L> + ?Sized,
impl<A, B, C, D, E, F, G, H, I, J, K> PartialEq<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K) where
C: PartialEq<C>,
I: PartialEq<I>,
A: PartialEq<A>,
K: PartialEq<K> + ?Sized,
F: PartialEq<F>,
E: PartialEq<E>,
H: PartialEq<H>,
B: PartialEq<B>,
D: PartialEq<D>,
G: PartialEq<G>,
J: PartialEq<J>,
impl<A, B, C, D, E, F, G, H, I, J, K> PartialEq<(A, B, C, D, E, F, G, H, I, J, K)> for (A, B, C, D, E, F, G, H, I, J, K) where
C: PartialEq<C>,
I: PartialEq<I>,
A: PartialEq<A>,
K: PartialEq<K> + ?Sized,
F: PartialEq<F>,
E: PartialEq<E>,
H: PartialEq<H>,
B: PartialEq<B>,
D: PartialEq<D>,
G: PartialEq<G>,
J: PartialEq<J>,
1.55.0[src]impl<B, C> PartialEq<ControlFlow<B, C>> for ControlFlow<B, C> where
C: PartialEq<C>,
B: PartialEq<B>,
impl<B, C> PartialEq<ControlFlow<B, C>> for ControlFlow<B, C> where
C: PartialEq<C>,
B: PartialEq<B>,
Equality for two Arc
s.
Two Arc
s are equal if their inner values are equal, even if they are
stored in different allocation.
If T
also implements Eq
(implying reflexivity of equality),
two Arc
s that point to the same allocation are always equal.
Examples
use std::sync::Arc; let five = Arc::new(5); assert!(five == Arc::new(5));
Inequality for two Arc
s.
Two Arc
s are unequal if their inner values are unequal.
If T
also implements Eq
(implying reflexivity of equality),
two Arc
s that point to the same value are never unequal.
Examples
use std::sync::Arc; let five = Arc::new(5); assert!(five != Arc::new(6));
Equality for two Rc
s.
Two Rc
s are equal if their inner values are equal, even if they are
stored in different allocation.
If T
also implements Eq
(implying reflexivity of equality),
two Rc
s that point to the same allocation are
always equal.
Examples
use std::rc::Rc; let five = Rc::new(5); assert!(five == Rc::new(5));
Inequality for two Rc
s.
Two Rc
s are unequal if their inner values are unequal.
If T
also implements Eq
(implying reflexivity of equality),
two Rc
s that point to the same allocation are
never unequal.
Examples
use std::rc::Rc; let five = Rc::new(5); assert!(five != Rc::new(6));
impl PartialEq<OptionBool> for OptionBool
impl PartialEq<OptionBool> for OptionBool
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl<'t> PartialEq<Match<'t>> for Match<'t>
impl<'t> PartialEq<Match<'t>> for Match<'t>
impl<'t> PartialEq<Match<'t>> for Match<'t>
impl<'t> PartialEq<Match<'t>> for Match<'t>
impl PartialEq<Match> for Match
impl PartialEq<Match> for Match
impl PartialEq<WithComments> for WithComments
impl PartialEq<WithComments> for WithComments
impl PartialEq<ClassSetRange> for ClassSetRange
impl PartialEq<ClassSetRange> for ClassSetRange
impl PartialEq<ClassSet> for ClassSet
impl PartialEq<ClassSet> for ClassSet
impl PartialEq<ClassSetUnion> for ClassSetUnion
impl PartialEq<ClassSetUnion> for ClassSetUnion
impl PartialEq<Repetition> for Repetition
impl PartialEq<Repetition> for Repetition
impl PartialEq<ClassBracketed> for ClassBracketed
impl PartialEq<ClassBracketed> for ClassBracketed
impl PartialEq<Literals> for Literals
impl PartialEq<Literals> for Literals
impl PartialEq<ClassPerl> for ClassPerl
impl PartialEq<ClassPerl> for ClassPerl
impl PartialEq<RepetitionKind> for RepetitionKind
impl PartialEq<RepetitionKind> for RepetitionKind
impl PartialEq<Assertion> for Assertion
impl PartialEq<Assertion> for Assertion
impl PartialEq<Class> for Class
impl PartialEq<Class> for Class
impl PartialEq<Group> for Group
impl PartialEq<Group> for Group
impl PartialEq<GroupKind> for GroupKind
impl PartialEq<GroupKind> for GroupKind
impl PartialEq<ErrorKind> for ErrorKind
impl PartialEq<ErrorKind> for ErrorKind
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<ClassBytes> for ClassBytes
impl PartialEq<ClassBytes> for ClassBytes
impl PartialEq<Alternation> for Alternation
impl PartialEq<Alternation> for Alternation
impl PartialEq<Literal> for Literal
impl PartialEq<Literal> for Literal
impl PartialEq<LiteralKind> for LiteralKind
impl PartialEq<LiteralKind> for LiteralKind
impl PartialEq<CaptureName> for CaptureName
impl PartialEq<CaptureName> for CaptureName
impl PartialEq<ClassUnicodeOpKind> for ClassUnicodeOpKind
impl PartialEq<ClassUnicodeOpKind> for ClassUnicodeOpKind
impl PartialEq<Utf8Sequence> for Utf8Sequence
impl PartialEq<Utf8Sequence> for Utf8Sequence
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<ClassSetItem> for ClassSetItem
impl PartialEq<ClassSetItem> for ClassSetItem
impl PartialEq<RepetitionRange> for RepetitionRange
impl PartialEq<RepetitionRange> for RepetitionRange
impl PartialEq<Literal> for Literal
impl PartialEq<Literal> for Literal
impl PartialEq<FlagsItemKind> for FlagsItemKind
impl PartialEq<FlagsItemKind> for FlagsItemKind
impl PartialEq<Concat> for Concat
impl PartialEq<Concat> for Concat
impl PartialEq<Utf8Range> for Utf8Range
impl PartialEq<Utf8Range> for Utf8Range
impl PartialEq<Repetition> for Repetition
impl PartialEq<Repetition> for Repetition
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<Span> for Span
impl PartialEq<Span> for Span
impl PartialEq<RepetitionOp> for RepetitionOp
impl PartialEq<RepetitionOp> for RepetitionOp
impl PartialEq<SetFlags> for SetFlags
impl PartialEq<SetFlags> for SetFlags
impl PartialEq<Hir> for Hir
impl PartialEq<Hir> for Hir
impl PartialEq<Comment> for Comment
impl PartialEq<Comment> for Comment
impl PartialEq<ClassUnicodeKind> for ClassUnicodeKind
impl PartialEq<ClassUnicodeKind> for ClassUnicodeKind
impl PartialEq<FlagsItem> for FlagsItem
impl PartialEq<FlagsItem> for FlagsItem
impl PartialEq<GroupKind> for GroupKind
impl PartialEq<GroupKind> for GroupKind
impl PartialEq<ClassSetBinaryOpKind> for ClassSetBinaryOpKind
impl PartialEq<ClassSetBinaryOpKind> for ClassSetBinaryOpKind
impl PartialEq<ClassUnicode> for ClassUnicode
impl PartialEq<ClassUnicode> for ClassUnicode
impl PartialEq<ClassAscii> for ClassAscii
impl PartialEq<ClassAscii> for ClassAscii
impl PartialEq<ClassUnicode> for ClassUnicode
impl PartialEq<ClassUnicode> for ClassUnicode
impl PartialEq<Position> for Position
impl PartialEq<Position> for Position
impl PartialEq<RepetitionRange> for RepetitionRange
impl PartialEq<RepetitionRange> for RepetitionRange
impl PartialEq<ClassBytesRange> for ClassBytesRange
impl PartialEq<ClassBytesRange> for ClassBytesRange
impl PartialEq<Flags> for Flags
impl PartialEq<Flags> for Flags
impl PartialEq<RepetitionKind> for RepetitionKind
impl PartialEq<RepetitionKind> for RepetitionKind
impl PartialEq<ClassSetBinaryOp> for ClassSetBinaryOp
impl PartialEq<ClassSetBinaryOp> for ClassSetBinaryOp
impl PartialEq<SpecialLiteralKind> for SpecialLiteralKind
impl PartialEq<SpecialLiteralKind> for SpecialLiteralKind
impl PartialEq<ClassUnicodeRange> for ClassUnicodeRange
impl PartialEq<ClassUnicodeRange> for ClassUnicodeRange
impl PartialEq<HirKind> for HirKind
impl PartialEq<HirKind> for HirKind
impl PartialEq<Class> for Class
impl PartialEq<Class> for Class
impl PartialEq<Group> for Group
impl PartialEq<Group> for Group
impl PartialEq<Ast> for Ast
impl PartialEq<Ast> for Ast
impl PartialEq<WaitTimeoutResult> for WaitTimeoutResult
impl PartialEq<WaitTimeoutResult> for WaitTimeoutResult
impl PartialEq<UnparkToken> for UnparkToken
impl PartialEq<UnparkToken> for UnparkToken
impl PartialEq<ParkToken> for ParkToken
impl PartialEq<ParkToken> for ParkToken
impl PartialEq<UnparkResult> for UnparkResult
impl PartialEq<UnparkResult> for UnparkResult
impl PartialEq<ParkResult> for ParkResult
impl PartialEq<ParkResult> for ParkResult
impl PartialEq<Colour> for Colour
impl PartialEq<Colour> for Colour
impl PartialEq<Style> for Style
impl PartialEq<Style> for Style
impl<Number, Hash> PartialEq<ChangesTrieConfigurationRange<Number, Hash>> for ChangesTrieConfigurationRange<Number, Hash> where
Hash: PartialEq<Hash>,
Number: PartialEq<Number>,
impl<Number, Hash> PartialEq<ChangesTrieConfigurationRange<Number, Hash>> for ChangesTrieConfigurationRange<Number, Hash> where
Hash: PartialEq<Hash>,
Number: PartialEq<Number>,
impl PartialEq<RuntimeValue> for RuntimeValue
impl PartialEq<RuntimeValue> for RuntimeValue
impl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
impl PartialEq<DataSection> for DataSection
impl PartialEq<DataSection> for DataSection
impl PartialEq<Section> for Section
impl PartialEq<Section> for Section
impl PartialEq<TypeSection> for TypeSection
impl PartialEq<TypeSection> for TypeSection
impl PartialEq<Type> for Type
impl PartialEq<Type> for Type
impl PartialEq<NameSection> for NameSection
impl PartialEq<NameSection> for NameSection
impl PartialEq<ModuleNameSubsection> for ModuleNameSubsection
impl PartialEq<ModuleNameSubsection> for ModuleNameSubsection
impl PartialEq<VarUint1> for VarUint1
impl PartialEq<VarUint1> for VarUint1
impl PartialEq<FunctionSection> for FunctionSection
impl PartialEq<FunctionSection> for FunctionSection
impl PartialEq<VarUint7> for VarUint7
impl PartialEq<VarUint7> for VarUint7
impl PartialEq<Local> for Local
impl PartialEq<Local> for Local
impl PartialEq<VarInt32> for VarInt32
impl PartialEq<VarInt32> for VarInt32
impl PartialEq<MemoryType> for MemoryType
impl PartialEq<MemoryType> for MemoryType
impl PartialEq<GlobalSection> for GlobalSection
impl PartialEq<GlobalSection> for GlobalSection
impl PartialEq<Internal> for Internal
impl PartialEq<Internal> for Internal
impl PartialEq<Uint32> for Uint32
impl PartialEq<Uint32> for Uint32
impl PartialEq<TableElementType> for TableElementType
impl PartialEq<TableElementType> for TableElementType
impl PartialEq<Module> for Module
impl PartialEq<Module> for Module
impl PartialEq<ResizableLimits> for ResizableLimits
impl PartialEq<ResizableLimits> for ResizableLimits
impl PartialEq<RelocationEntry> for RelocationEntry
impl PartialEq<RelocationEntry> for RelocationEntry
impl PartialEq<DataSegment> for DataSegment
impl PartialEq<DataSegment> for DataSegment
impl PartialEq<ExportSection> for ExportSection
impl PartialEq<ExportSection> for ExportSection
impl PartialEq<InitExpr> for InitExpr
impl PartialEq<InitExpr> for InitExpr
impl PartialEq<ElementSection> for ElementSection
impl PartialEq<ElementSection> for ElementSection
impl PartialEq<VarUint32> for VarUint32
impl PartialEq<VarUint32> for VarUint32
impl PartialEq<MemorySection> for MemorySection
impl PartialEq<MemorySection> for MemorySection
impl PartialEq<CustomSection> for CustomSection
impl PartialEq<CustomSection> for CustomSection
impl PartialEq<External> for External
impl PartialEq<External> for External
impl PartialEq<BrTableData> for BrTableData
impl PartialEq<BrTableData> for BrTableData
impl PartialEq<FuncBody> for FuncBody
impl PartialEq<FuncBody> for FuncBody
impl PartialEq<ImportCountType> for ImportCountType
impl PartialEq<ImportCountType> for ImportCountType
impl PartialEq<Instruction> for Instruction
impl PartialEq<Instruction> for Instruction
impl PartialEq<LocalNameSubsection> for LocalNameSubsection
impl PartialEq<LocalNameSubsection> for LocalNameSubsection
impl PartialEq<ExportEntry> for ExportEntry
impl PartialEq<ExportEntry> for ExportEntry
impl PartialEq<CodeSection> for CodeSection
impl PartialEq<CodeSection> for CodeSection
impl PartialEq<BlockType> for BlockType
impl PartialEq<BlockType> for BlockType
impl PartialEq<TableEntryDefinition> for TableEntryDefinition
impl PartialEq<TableEntryDefinition> for TableEntryDefinition
impl PartialEq<ImportEntry> for ImportEntry
impl PartialEq<ImportEntry> for ImportEntry
impl PartialEq<TableSection> for TableSection
impl PartialEq<TableSection> for TableSection
impl PartialEq<RelocSection> for RelocSection
impl PartialEq<RelocSection> for RelocSection
impl PartialEq<GlobalType> for GlobalType
impl PartialEq<GlobalType> for GlobalType
impl PartialEq<ImportSection> for ImportSection
impl PartialEq<ImportSection> for ImportSection
impl PartialEq<ElementSegment> for ElementSegment
impl PartialEq<ElementSegment> for ElementSegment
impl PartialEq<VarUint64> for VarUint64
impl PartialEq<VarUint64> for VarUint64
impl PartialEq<TableDefinition> for TableDefinition
impl PartialEq<TableDefinition> for TableDefinition
impl PartialEq<Uint8> for Uint8
impl PartialEq<Uint8> for Uint8
impl PartialEq<Uint64> for Uint64
impl PartialEq<Uint64> for Uint64
impl PartialEq<FunctionNameSubsection> for FunctionNameSubsection
impl PartialEq<FunctionNameSubsection> for FunctionNameSubsection
impl PartialEq<VarInt7> for VarInt7
impl PartialEq<VarInt7> for VarInt7
impl PartialEq<Func> for Func
impl PartialEq<Func> for Func
impl PartialEq<TableType> for TableType
impl PartialEq<TableType> for TableType
impl PartialEq<GlobalEntry> for GlobalEntry
impl PartialEq<GlobalEntry> for GlobalEntry
impl PartialEq<FunctionType> for FunctionType
impl PartialEq<FunctionType> for FunctionType
impl PartialEq<VarInt64> for VarInt64
impl PartialEq<VarInt64> for VarInt64
impl PartialEq<Instructions> for Instructions
impl PartialEq<Instructions> for Instructions
impl PartialEq<Pages> for Pages
impl PartialEq<Pages> for Pages
impl PartialEq<Words> for Words
impl PartialEq<Words> for Words
impl PartialEq<Pages> for Pages
impl PartialEq<Pages> for Pages
impl PartialEq<Bytes> for Bytes
impl PartialEq<Bytes> for Bytes
impl PartialEq<Words> for Words
impl PartialEq<Words> for Words
impl PartialEq<Errno> for Errno
impl PartialEq<Errno> for Errno
impl<Hash> PartialEq<StorageChangeSet<Hash>> for StorageChangeSet<Hash> where
Hash: PartialEq<Hash>,
impl<Hash> PartialEq<StorageChangeSet<Hash>> for StorageChangeSet<Hash> where
Hash: PartialEq<Hash>,
impl PartialEq<U256> for U256
impl PartialEq<U256> for U256
impl PartialEq<U128> for U128
impl PartialEq<U128> for U128
impl PartialEq<U512> for U512
impl PartialEq<U512> for U512
impl PartialEq<FromStrRadixErrKind> for FromStrRadixErrKind
impl PartialEq<FromStrRadixErrKind> for FromStrRadixErrKind
impl PartialEq<FromBase58Error> for FromBase58Error
impl PartialEq<FromBase58Error> for FromBase58Error
impl PartialEq<InvalidKeyLength> for InvalidKeyLength
impl PartialEq<InvalidKeyLength> for InvalidKeyLength
impl PartialEq<RecoveryId> for RecoveryId
impl PartialEq<RecoveryId> for RecoveryId
impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
impl PartialEq<SecretKey> for SecretKey
impl PartialEq<SecretKey> for SecretKey
impl PartialEq<Affine> for Affine
impl PartialEq<Affine> for Affine
impl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
impl PartialEq<Jacobian> for Jacobian
impl PartialEq<Jacobian> for Jacobian
impl PartialEq<AffineStorage> for AffineStorage
impl PartialEq<AffineStorage> for AffineStorage
impl PartialEq<Message> for Message
impl PartialEq<Message> for Message
impl PartialEq<Scalar> for Scalar
impl PartialEq<Scalar> for Scalar
impl PartialEq<InvalidKeyLength> for InvalidKeyLength
impl PartialEq<InvalidKeyLength> for InvalidKeyLength
impl PartialEq<u32x4> for u32x4
impl PartialEq<u32x4> for u32x4
impl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
impl PartialEq<RistrettoBoth> for RistrettoBoth
impl PartialEq<RistrettoBoth> for RistrettoBoth
We hide fields largely so that only compairing the compressed forms works.
impl PartialEq<Cosignature> for Cosignature
impl PartialEq<Cosignature> for Cosignature
impl PartialEq<MultiSignatureStage> for MultiSignatureStage
impl PartialEq<MultiSignatureStage> for MultiSignatureStage
impl PartialEq<ChainCode> for ChainCode
impl PartialEq<ChainCode> for ChainCode
impl PartialEq<SignatureError> for SignatureError
impl PartialEq<SignatureError> for SignatureError
impl PartialEq<Reveal> for Reveal
impl PartialEq<Reveal> for Reveal
impl PartialEq<VRFInOut> for VRFInOut
impl PartialEq<VRFInOut> for VRFInOut
impl PartialEq<Commitment> for Commitment
impl PartialEq<Commitment> for Commitment
impl PartialEq<VRFProof> for VRFProof
impl PartialEq<VRFProof> for VRFProof
impl PartialEq<VRFProofBatchable> for VRFProofBatchable
impl PartialEq<VRFProofBatchable> for VRFProofBatchable
impl PartialEq<ECQVCertPublic> for ECQVCertPublic
impl PartialEq<ECQVCertPublic> for ECQVCertPublic
impl PartialEq<VRFOutput> for VRFOutput
impl PartialEq<VRFOutput> for VRFOutput
impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
impl PartialEq<TryReserveError> for TryReserveError
impl PartialEq<TryReserveError> for TryReserveError
impl<T, S, A> PartialEq<HashSet<T, S, A>> for HashSet<T, S, A> where
T: Eq + Hash,
A: Allocator + Clone,
S: BuildHasher,
impl<T, S, A> PartialEq<HashSet<T, S, A>> for HashSet<T, S, A> where
T: Eq + Hash,
A: Allocator + Clone,
S: BuildHasher,
impl PartialEq<XxHash32> for XxHash32
impl PartialEq<XxHash32> for XxHash32
impl PartialEq<XxHash64> for XxHash64
impl PartialEq<XxHash64> for XxHash64
impl PartialEq<SendError> for SendError
impl PartialEq<SendError> for SendError
impl PartialEq<NibbleSlicePlan> for NibbleSlicePlan
impl PartialEq<NibbleSlicePlan> for NibbleSlicePlan
impl PartialEq<NodeHandlePlan> for NodeHandlePlan
impl PartialEq<NodeHandlePlan> for NodeHandlePlan
impl PartialEq<NodePlan> for NodePlan
impl PartialEq<NodePlan> for NodePlan
impl<'a> PartialEq<Node<'a>> for Node<'a>
impl<'a> PartialEq<Node<'a>> for Node<'a>
impl<'a> PartialEq<NodeHandle<'a>> for NodeHandle<'a>
impl<'a> PartialEq<NodeHandle<'a>> for NodeHandle<'a>
impl PartialEq<NibbleVec> for NibbleVec
impl PartialEq<NibbleVec> for NibbleVec
impl<'a> PartialEq<NibbleSlice<'a>> for NibbleSlice<'a>
impl<'a> PartialEq<NibbleSlice<'a>> for NibbleSlice<'a>
impl<H, N> PartialEq<TestExternalities<H, N>> for TestExternalities<H, N> where
H: Hasher,
N: BlockNumber,
<H as Hasher>::Out: Ord,
<H as Hasher>::Out: 'static,
<H as Hasher>::Out: Codec,
impl<H, N> PartialEq<TestExternalities<H, N>> for TestExternalities<H, N> where
H: Hasher,
N: BlockNumber,
<H as Hasher>::Out: Ord,
<H as Hasher>::Out: 'static,
<H as Hasher>::Out: Codec,
This doesn’t test if they are in the same state, only if they contains the same data at this state
impl<H, N> PartialEq<CacheAction<H, N>> for CacheAction<H, N> where
H: PartialEq<H>,
N: PartialEq<N>,
impl<H, N> PartialEq<CacheAction<H, N>> for CacheAction<H, N> where
H: PartialEq<H>,
N: PartialEq<N>,
impl PartialEq<DwLang> for DwLang
impl PartialEq<DwLang> for DwLang
impl PartialEq<DwAt> for DwAt
impl PartialEq<DwAt> for DwAt
impl PartialEq<Range> for Range
impl PartialEq<Range> for Range
impl PartialEq<AttributeSpecification> for AttributeSpecification
impl PartialEq<AttributeSpecification> for AttributeSpecification
impl PartialEq<DwVis> for DwVis
impl PartialEq<DwVis> for DwVis
impl PartialEq<DwOrd> for DwOrd
impl PartialEq<DwOrd> for DwOrd
impl PartialEq<DwLle> for DwLle
impl PartialEq<DwLle> for DwLle
impl PartialEq<DwIdx> for DwIdx
impl PartialEq<DwIdx> for DwIdx
impl PartialEq<DwChildren> for DwChildren
impl PartialEq<DwChildren> for DwChildren
impl<'bases, Section, R> PartialEq<PartialFrameDescriptionEntry<'bases, Section, R>> for PartialFrameDescriptionEntry<'bases, Section, R> where
R: PartialEq<R> + Reader,
Section: PartialEq<Section> + UnwindSection<R>,
<R as Reader>::Offset: PartialEq<<R as Reader>::Offset>,
<Section as UnwindSection<R>>::Offset: PartialEq<<Section as UnwindSection<R>>::Offset>,
impl<'bases, Section, R> PartialEq<PartialFrameDescriptionEntry<'bases, Section, R>> for PartialFrameDescriptionEntry<'bases, Section, R> where
R: PartialEq<R> + Reader,
Section: PartialEq<Section> + UnwindSection<R>,
<R as Reader>::Offset: PartialEq<<R as Reader>::Offset>,
<Section as UnwindSection<R>>::Offset: PartialEq<<Section as UnwindSection<R>>::Offset>,
impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
impl PartialEq<DwEnd> for DwEnd
impl PartialEq<DwEnd> for DwEnd
impl PartialEq<DwRle> for DwRle
impl PartialEq<DwRle> for DwRle
impl PartialEq<DwUt> for DwUt
impl PartialEq<DwUt> for DwUt
impl PartialEq<DwCc> for DwCc
impl PartialEq<DwCc> for DwCc
impl PartialEq<FileEntryFormat> for FileEntryFormat
impl PartialEq<FileEntryFormat> for FileEntryFormat
impl PartialEq<DwoId> for DwoId
impl PartialEq<DwoId> for DwoId
impl PartialEq<DwInl> for DwInl
impl PartialEq<DwInl> for DwInl
impl PartialEq<Abbreviation> for Abbreviation
impl PartialEq<Abbreviation> for Abbreviation
impl PartialEq<DwAccess> for DwAccess
impl PartialEq<DwAccess> for DwAccess
impl PartialEq<SectionBaseAddresses> for SectionBaseAddresses
impl PartialEq<SectionBaseAddresses> for SectionBaseAddresses
impl PartialEq<DwDsc> for DwDsc
impl PartialEq<DwDsc> for DwDsc
impl PartialEq<Pointer> for Pointer
impl PartialEq<Pointer> for Pointer
impl PartialEq<ReaderOffsetId> for ReaderOffsetId
impl PartialEq<ReaderOffsetId> for ReaderOffsetId
impl PartialEq<DwVirtuality> for DwVirtuality
impl PartialEq<DwVirtuality> for DwVirtuality
impl PartialEq<DwId> for DwId
impl PartialEq<DwId> for DwId
impl PartialEq<DwEhPe> for DwEhPe
impl PartialEq<DwEhPe> for DwEhPe
impl PartialEq<LineEncoding> for LineEncoding
impl PartialEq<LineEncoding> for LineEncoding
impl PartialEq<DwTag> for DwTag
impl PartialEq<DwTag> for DwTag
impl PartialEq<DwLns> for DwLns
impl PartialEq<DwLns> for DwLns
impl PartialEq<DwForm> for DwForm
impl PartialEq<DwForm> for DwForm
impl PartialEq<DwOp> for DwOp
impl PartialEq<DwOp> for DwOp
impl PartialEq<Encoding> for Encoding
impl PartialEq<Encoding> for Encoding
impl PartialEq<DwMacro> for DwMacro
impl PartialEq<DwMacro> for DwMacro
impl PartialEq<Register> for Register
impl PartialEq<Register> for Register
impl PartialEq<DwAddr> for DwAddr
impl PartialEq<DwAddr> for DwAddr
impl PartialEq<BaseAddresses> for BaseAddresses
impl PartialEq<BaseAddresses> for BaseAddresses
impl PartialEq<DwLnct> for DwLnct
impl PartialEq<DwLnct> for DwLnct
impl PartialEq<Augmentation> for Augmentation
impl PartialEq<Augmentation> for Augmentation
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl PartialEq<DwLne> for DwLne
impl PartialEq<DwLne> for DwLne
impl PartialEq<ColumnType> for ColumnType
impl PartialEq<ColumnType> for ColumnType
impl PartialEq<DwCfa> for DwCfa
impl PartialEq<DwCfa> for DwCfa
impl PartialEq<LineRow> for LineRow
impl PartialEq<LineRow> for LineRow
impl PartialEq<DwDs> for DwDs
impl PartialEq<DwDs> for DwDs
impl PartialEq<DebugTypeSignature> for DebugTypeSignature
impl PartialEq<DebugTypeSignature> for DebugTypeSignature
impl PartialEq<DwDefaulted> for DwDefaulted
impl PartialEq<DwDefaulted> for DwDefaulted
impl PartialEq<DwAte> for DwAte
impl PartialEq<DwAte> for DwAte
impl PartialEq<CompressionFormat> for CompressionFormat
impl PartialEq<CompressionFormat> for CompressionFormat
impl PartialEq<SectionIndex> for SectionIndex
impl PartialEq<SectionIndex> for SectionIndex
impl PartialEq<RelocationEncoding> for RelocationEncoding
impl PartialEq<RelocationEncoding> for RelocationEncoding
impl<'data> PartialEq<CompressedData<'data>> for CompressedData<'data>
impl<'data> PartialEq<CompressedData<'data>> for CompressedData<'data>
impl PartialEq<SectionFlags> for SectionFlags
impl PartialEq<SectionFlags> for SectionFlags
impl<'data> PartialEq<Bytes<'data>> for Bytes<'data>
impl<'data> PartialEq<Bytes<'data>> for Bytes<'data>
impl<'data> PartialEq<SymbolMapName<'data>> for SymbolMapName<'data>
impl<'data> PartialEq<SymbolMapName<'data>> for SymbolMapName<'data>
impl PartialEq<RelocationKind> for RelocationKind
impl PartialEq<RelocationKind> for RelocationKind
impl PartialEq<SymbolSection> for SymbolSection
impl PartialEq<SymbolSection> for SymbolSection
impl PartialEq<FileFlags> for FileFlags
impl PartialEq<FileFlags> for FileFlags
impl PartialEq<SectionKind> for SectionKind
impl PartialEq<SectionKind> for SectionKind
impl PartialEq<SymbolIndex> for SymbolIndex
impl PartialEq<SymbolIndex> for SymbolIndex
impl PartialEq<RelocationTarget> for RelocationTarget
impl PartialEq<RelocationTarget> for RelocationTarget
impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl<'data> PartialEq<ObjectMapEntry<'data>> for ObjectMapEntry<'data>
impl<'data> PartialEq<ObjectMapEntry<'data>> for ObjectMapEntry<'data>
impl<'data> PartialEq<Import<'data>> for Import<'data>
impl<'data> PartialEq<Import<'data>> for Import<'data>
impl<'data> PartialEq<Export<'data>> for Export<'data>
impl<'data> PartialEq<Export<'data>> for Export<'data>
impl PartialEq<CompressionStrategy> for CompressionStrategy
impl PartialEq<CompressionStrategy> for CompressionStrategy
impl PartialEq<CompressionLevel> for CompressionLevel
impl PartialEq<CompressionLevel> for CompressionLevel
impl PartialEq<StreamResult> for StreamResult
impl PartialEq<StreamResult> for StreamResult
impl<'a, Hash> PartialEq<DigestItemRef<'a, Hash>> for DigestItemRef<'a, Hash> where
Hash: 'a + PartialEq<Hash>,
impl<'a, Hash> PartialEq<DigestItemRef<'a, Hash>> for DigestItemRef<'a, Hash> where
Hash: 'a + PartialEq<Hash>,
impl<Block> PartialEq<SignedBlock<Block>> for SignedBlock<Block> where
Block: PartialEq<Block>,
impl<Block> PartialEq<SignedBlock<Block>> for SignedBlock<Block> where
Block: PartialEq<Block>,
impl<Address, Call, Signature, Extra> PartialEq<UncheckedExtrinsic<Address, Call, Signature, Extra>> for UncheckedExtrinsic<Address, Call, Signature, Extra> where
Call: PartialEq<Call>,
Extra: PartialEq<Extra> + SignedExtension,
Address: PartialEq<Address>,
Signature: PartialEq<Signature>,
impl<Address, Call, Signature, Extra> PartialEq<UncheckedExtrinsic<Address, Call, Signature, Extra>> for UncheckedExtrinsic<Address, Call, Signature, Extra> where
Call: PartialEq<Call>,
Extra: PartialEq<Extra> + SignedExtension,
Address: PartialEq<Address>,
Signature: PartialEq<Signature>,
impl<AccountId, Call, Extra> PartialEq<CheckedExtrinsic<AccountId, Call, Extra>> for CheckedExtrinsic<AccountId, Call, Extra> where
Call: PartialEq<Call>,
AccountId: PartialEq<AccountId>,
Extra: PartialEq<Extra>,
impl<AccountId, Call, Extra> PartialEq<CheckedExtrinsic<AccountId, Call, Extra>> for CheckedExtrinsic<AccountId, Call, Extra> where
Call: PartialEq<Call>,
AccountId: PartialEq<AccountId>,
Extra: PartialEq<Extra>,
impl<AccountId, AccountIndex> PartialEq<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex> where
AccountId: PartialEq<AccountId>,
AccountIndex: PartialEq<AccountIndex>,
impl<AccountId, AccountIndex> PartialEq<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex> where
AccountId: PartialEq<AccountId>,
AccountIndex: PartialEq<AccountIndex>,
impl<T, E> PartialEq<MutateStorageError<T, E>> for MutateStorageError<T, E> where
T: PartialEq<T>,
E: PartialEq<E>,
impl<T, E> PartialEq<MutateStorageError<T, E>> for MutateStorageError<T, E> where
T: PartialEq<T>,
E: PartialEq<E>,
impl<B> PartialEq<BlockAndTimeDeadline<B>> for BlockAndTimeDeadline<B> where
B: PartialEq<B> + BlockNumberProvider,
impl<B> PartialEq<BlockAndTimeDeadline<B>> for BlockAndTimeDeadline<B> where
B: PartialEq<B> + BlockNumberProvider,
impl<Reporter, Offender> PartialEq<OffenceDetails<Reporter, Offender>> for OffenceDetails<Reporter, Offender> where
Reporter: PartialEq<Reporter>,
Offender: PartialEq<Offender>,
impl<Reporter, Offender> PartialEq<OffenceDetails<Reporter, Offender>> for OffenceDetails<Reporter, Offender> where
Reporter: PartialEq<Reporter>,
Offender: PartialEq<Offender>,
Implementors
impl<'_, T, U, A, const N: usize> PartialEq<&'_ [U; N]> for Vec<T, A> where
T: PartialEq<U>,
A: Allocator,
impl<A: PartialEq + AssetId, B: PartialEq + Balance, OnDrop: PartialEq + HandleImbalanceDrop<A, B>, OppositeOnDrop: PartialEq + HandleImbalanceDrop<A, B>> PartialEq<Imbalance<A, B, OnDrop, OppositeOnDrop>> for frame_support::traits::tokens::fungibles::Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<B, O> PartialEq<DecodeDifferent<B, O>> for DecodeDifferent<B, O> where
O: Encode + Eq + PartialEq<O> + 'static,
B: Encode + Eq + PartialEq<B> + 'static,
impl<B: PartialEq + Balance, OnDrop: PartialEq + HandleImbalanceDrop<B>, OppositeOnDrop: PartialEq + HandleImbalanceDrop<B>> PartialEq<Imbalance<B, OnDrop, OppositeOnDrop>> for frame_support::traits::tokens::fungible::Imbalance<B, OnDrop, OppositeOnDrop>
impl<Balance: PartialEq> PartialEq<WithdrawConsequence<Balance>> for WithdrawConsequence<Balance>
impl<BlockNumber: PartialEq> PartialEq<DispatchTime<BlockNumber>> for DispatchTime<BlockNumber>
impl<K, V, S> PartialEq<BoundedBTreeMap<K, V, S>> for BoundedBTreeMap<K, V, S> where
BTreeMap<K, V>: PartialEq,
impl<K, V, S> PartialEq<BTreeMap<K, V>> for BoundedBTreeMap<K, V, S> where
BTreeMap<K, V>: PartialEq,
impl<T, S> PartialEq<BoundedBTreeSet<T, S>> for BoundedBTreeSet<T, S> where
BTreeSet<T>: PartialEq,