Trait frame_support::dispatch::marker::StructuralPartialEq [−][src]
pub trait StructuralPartialEq { }
🔬 This is a nightly-only experimental API. (
structural_match
)Expand description
Required trait for constants used in pattern matches.
Any type that derives PartialEq
automatically implements this trait,
regardless of whether its type-parameters implement Eq
.
If a const
item contains some type that does not implement this trait,
then that type either (1.) does not implement PartialEq
(which means the
constant will not provide that comparison method, which code generation
assumes is available), or (2.) it implements its own version of
PartialEq
(which we assume does not conform to a structural-equality
comparison).
In either of the two scenarios above, we reject usage of such a constant in a pattern match.
See also the structural match RFC, and issue 63438 which motivated migrating from attribute-based design to this trait.
Implementations on Foreign Types
impl StructuralPartialEq for OptionBool
impl StructuralPartialEq for Error
impl<T> StructuralPartialEq for Compact<T>
impl StructuralPartialEq for Error
impl StructuralPartialEq for Error
impl<'t> StructuralPartialEq for Match<'t>
impl<'t> StructuralPartialEq for Match<'t>
impl StructuralPartialEq for Match
impl StructuralPartialEq for MatchKind
impl StructuralPartialEq for MatchKind
impl StructuralPartialEq for Utf8Range
impl StructuralPartialEq for FlagsItem
impl StructuralPartialEq for ClassUnicodeOpKind
impl StructuralPartialEq for Comment
impl StructuralPartialEq for ClassSetBinaryOpKind
impl StructuralPartialEq for Position
impl StructuralPartialEq for ClassBytesRange
impl StructuralPartialEq for FlagsItemKind
impl StructuralPartialEq for Hir
impl StructuralPartialEq for Class
impl StructuralPartialEq for ClassSetItem
impl StructuralPartialEq for Ast
impl StructuralPartialEq for ClassPerl
impl StructuralPartialEq for WordBoundary
impl StructuralPartialEq for Repetition
impl StructuralPartialEq for ClassUnicodeRange
impl StructuralPartialEq for CaptureName
impl StructuralPartialEq for ClassSetBinaryOp
impl StructuralPartialEq for Error
impl StructuralPartialEq for Span
impl StructuralPartialEq for RepetitionOp
impl StructuralPartialEq for Utf8Sequence
impl StructuralPartialEq for Literal
impl StructuralPartialEq for GroupKind
impl StructuralPartialEq for ClassUnicode
impl StructuralPartialEq for Error
impl StructuralPartialEq for ClassSetUnion
impl StructuralPartialEq for Literal
impl StructuralPartialEq for Alternation
impl StructuralPartialEq for Flag
impl StructuralPartialEq for RepetitionKind
impl StructuralPartialEq for Concat
impl StructuralPartialEq for RepetitionRange
impl StructuralPartialEq for HexLiteralKind
impl StructuralPartialEq for Anchor
impl StructuralPartialEq for AssertionKind
impl StructuralPartialEq for Group
impl StructuralPartialEq for ClassPerlKind
impl StructuralPartialEq for ErrorKind
impl StructuralPartialEq for ClassUnicode
impl StructuralPartialEq for ClassSet
impl StructuralPartialEq for ClassUnicodeKind
impl StructuralPartialEq for GroupKind
impl StructuralPartialEq for ErrorKind
impl StructuralPartialEq for ClassBracketed
impl StructuralPartialEq for Class
impl StructuralPartialEq for Literals
impl StructuralPartialEq for Assertion
impl StructuralPartialEq for Repetition
impl StructuralPartialEq for SetFlags
impl StructuralPartialEq for Error
impl StructuralPartialEq for WithComments
impl StructuralPartialEq for Flags
impl StructuralPartialEq for RepetitionRange
impl StructuralPartialEq for ClassAscii
impl StructuralPartialEq for LiteralKind
impl StructuralPartialEq for HirKind
impl StructuralPartialEq for ClassSetRange
impl StructuralPartialEq for RepetitionKind
impl StructuralPartialEq for Group
impl StructuralPartialEq for SpecialLiteralKind
impl StructuralPartialEq for ClassAsciiKind
impl StructuralPartialEq for ClassBytes
impl StructuralPartialEq for WaitTimeoutResult
impl StructuralPartialEq for OnceState
impl StructuralPartialEq for RequeueOp
impl StructuralPartialEq for ParkToken
impl StructuralPartialEq for UnparkToken
impl StructuralPartialEq for ParkResult
impl StructuralPartialEq for UnparkResult
impl StructuralPartialEq for FilterOp
impl StructuralPartialEq for LittleEndian
impl StructuralPartialEq for BigEndian
impl<'a, S> StructuralPartialEq for ANSIGenericStrings<'a, S> where
S: 'a + ToOwned + PartialEq<S> + ?Sized,
<S as ToOwned>::Owned: Debug,
impl StructuralPartialEq for Style
impl StructuralPartialEq for Colour
impl<'a, S> StructuralPartialEq for ANSIGenericString<'a, S> where
S: 'a + ToOwned + ?Sized,
<S as ToOwned>::Owned: Debug,
impl StructuralPartialEq for RuntimeValue
impl StructuralPartialEq for Signature
impl StructuralPartialEq for ValueType
impl StructuralPartialEq for FunctionNameSubsection
impl StructuralPartialEq for ModuleNameSubsection
impl StructuralPartialEq for Func
impl StructuralPartialEq for VarUint64
impl StructuralPartialEq for TableType
impl StructuralPartialEq for VarInt64
impl StructuralPartialEq for Type
impl StructuralPartialEq for Instruction
impl StructuralPartialEq for ValueType
impl StructuralPartialEq for TableDefinition
impl StructuralPartialEq for Instructions
impl StructuralPartialEq for Local
impl StructuralPartialEq for GlobalSection
impl StructuralPartialEq for BlockType
impl StructuralPartialEq for TableSection
impl StructuralPartialEq for ExportEntry
impl StructuralPartialEq for GlobalType
impl StructuralPartialEq for Section
impl StructuralPartialEq for FunctionType
impl StructuralPartialEq for Module
impl StructuralPartialEq for Uint8
impl StructuralPartialEq for BrTableData
impl StructuralPartialEq for ImportEntry
impl StructuralPartialEq for GlobalEntry
impl StructuralPartialEq for VarInt7
impl StructuralPartialEq for InitExpr
impl StructuralPartialEq for ElementSegment
impl StructuralPartialEq for Uint64
impl StructuralPartialEq for DataSegment
impl StructuralPartialEq for TypeSection
impl StructuralPartialEq for FunctionSection
impl StructuralPartialEq for DataSection
impl StructuralPartialEq for VarInt32
impl StructuralPartialEq for ImportCountType
impl StructuralPartialEq for ImportSection
impl StructuralPartialEq for MemorySection
impl StructuralPartialEq for ElementSection
impl StructuralPartialEq for CustomSection
impl StructuralPartialEq for LocalNameSubsection
impl StructuralPartialEq for Uint32
impl StructuralPartialEq for FuncBody
impl StructuralPartialEq for Internal
impl StructuralPartialEq for VarUint32
impl StructuralPartialEq for RelocSection
impl StructuralPartialEq for ExportSection
impl StructuralPartialEq for CodeSection
impl StructuralPartialEq for RelocationEntry
impl StructuralPartialEq for VarUint7
impl StructuralPartialEq for NameSection
impl StructuralPartialEq for VarUint1
impl StructuralPartialEq for External
impl StructuralPartialEq for TableEntryDefinition
impl StructuralPartialEq for MemoryType
impl StructuralPartialEq for ResizableLimits
impl StructuralPartialEq for TableElementType
impl StructuralPartialEq for StartedWith
impl StructuralPartialEq for Words
impl StructuralPartialEq for Pages
impl StructuralPartialEq for Pages
impl StructuralPartialEq for Words
impl StructuralPartialEq for Bytes
impl StructuralPartialEq for Errno
impl StructuralPartialEq for U128
impl StructuralPartialEq for U256
impl StructuralPartialEq for U512
impl StructuralPartialEq for Error
impl StructuralPartialEq for FromDecStrErr
impl StructuralPartialEq for FromStrRadixErrKind
impl<V, A> StructuralPartialEq for TArr<V, A>
impl StructuralPartialEq for Equal
impl StructuralPartialEq for Greater
impl<U> StructuralPartialEq for NInt<U> where
U: Unsigned + NonZero,
impl StructuralPartialEq for B1
impl StructuralPartialEq for Less
impl<U, B> StructuralPartialEq for UInt<U, B>
impl StructuralPartialEq for UTerm
impl<U> StructuralPartialEq for PInt<U> where
U: Unsigned + NonZero,
impl StructuralPartialEq for B0
impl StructuralPartialEq for ATerm
impl StructuralPartialEq for Z0
impl StructuralPartialEq for FromBase58Error
impl StructuralPartialEq for Language
impl StructuralPartialEq for IsNormalized
impl StructuralPartialEq for InvalidKeyLength
impl StructuralPartialEq for MacError
impl StructuralPartialEq for Jacobian
impl StructuralPartialEq for RecoveryId
impl StructuralPartialEq for Error
impl StructuralPartialEq for Message
impl StructuralPartialEq for PublicKey
impl StructuralPartialEq for AffineStorage
impl StructuralPartialEq for SecretKey
impl StructuralPartialEq for Scalar
impl StructuralPartialEq for Signature
impl StructuralPartialEq for Affine
impl StructuralPartialEq for MacError
impl StructuralPartialEq for InvalidKeyLength
impl StructuralPartialEq for u32x4
impl StructuralPartialEq for Error
impl StructuralPartialEq for VRFInOut
impl StructuralPartialEq for VRFOutput
impl StructuralPartialEq for SignatureError
impl StructuralPartialEq for ECQVCertPublic
impl StructuralPartialEq for Cosignature
impl StructuralPartialEq for VRFProofBatchable
impl<K> StructuralPartialEq for ExtendedKey<K>
impl StructuralPartialEq for Commitment
impl StructuralPartialEq for Signature
impl StructuralPartialEq for ChainCode
impl StructuralPartialEq for VRFProof
impl StructuralPartialEq for MultiSignatureStage
impl StructuralPartialEq for PublicKey
impl StructuralPartialEq for PublicKey
impl StructuralPartialEq for TryReserveError
impl StructuralPartialEq for XxHash64
impl StructuralPartialEq for XxHash32
impl StructuralPartialEq for Aborted
impl StructuralPartialEq for PollNext
impl<T, E> StructuralPartialEq for TryChunksError<T, E>
impl<T> StructuralPartialEq for AllowStdIo<T>
impl<T> StructuralPartialEq for TrySendError<T>
impl StructuralPartialEq for Canceled
impl StructuralPartialEq for SendError
impl StructuralPartialEq for TrieSpec
impl StructuralPartialEq for NodePlan
impl<HO> StructuralPartialEq for Record<HO>
impl StructuralPartialEq for NibbleSlicePlan
impl StructuralPartialEq for NodeHandlePlan
impl<HO, CE> StructuralPartialEq for Error<HO, CE>
impl<'a> StructuralPartialEq for Node<'a>
impl<D> StructuralPartialEq for OwnedNode<D> where
D: Borrow<[u8]>,
impl<'a> StructuralPartialEq for NodeHandle<'a>
impl StructuralPartialEq for NibbleVec
impl<T, E> StructuralPartialEq for TrieError<T, E>
impl<T> StructuralPartialEq for MemCounter<T>
impl<T> StructuralPartialEq for NoopTracker<T>
impl<R, Offset> StructuralPartialEq for Location<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<T> StructuralPartialEq for DebugInfoOffset<T>
impl<R> StructuralPartialEq for CfaRule<R> where
R: Reader,
impl StructuralPartialEq for SectionBaseAddresses
impl StructuralPartialEq for Range
impl<T> StructuralPartialEq for LocationListsOffset<T>
impl<R, Offset> StructuralPartialEq for CompleteLineProgram<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<T> StructuralPartialEq for DebugRngListsBase<T>
impl StructuralPartialEq for DwDefaulted
impl StructuralPartialEq for DwChildren
impl<T> StructuralPartialEq for UnitSectionOffset<T>
impl<'bases, Section, R> StructuralPartialEq for PartialFrameDescriptionEntry<'bases, Section, R> where
R: Reader,
Section: UnwindSection<R>,
impl<T> StructuralPartialEq for EhFrameOffset<T>
impl StructuralPartialEq for DwInl
impl StructuralPartialEq for Value
impl StructuralPartialEq for DwoId
impl StructuralPartialEq for DwUt
impl<Offset> StructuralPartialEq for UnitType<Offset> where
Offset: ReaderOffset,
impl StructuralPartialEq for DwAccess
impl<R> StructuralPartialEq for LocationListEntry<R> where
R: Reader,
impl<T> StructuralPartialEq for DebugStrOffsetsIndex<T>
impl<R, Offset> StructuralPartialEq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl StructuralPartialEq for LineEncoding
impl StructuralPartialEq for BaseAddresses
impl<R, Offset> StructuralPartialEq for LineInstruction<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R> StructuralPartialEq for Attribute<R> where
R: Reader,
impl StructuralPartialEq for Abbreviation
impl StructuralPartialEq for DwDs
impl StructuralPartialEq for Pointer
impl StructuralPartialEq for DwIdx
impl<T> StructuralPartialEq for DebugStrOffset<T>
impl StructuralPartialEq for DwForm
impl StructuralPartialEq for BigEndian
impl StructuralPartialEq for DwEhPe
impl<R, Offset> StructuralPartialEq for FrameDescriptionEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<T> StructuralPartialEq for DebugAbbrevOffset<T>
impl StructuralPartialEq for ColumnType
impl StructuralPartialEq for DwAt
impl StructuralPartialEq for DwarfFileType
impl<R, Offset> StructuralPartialEq for FileEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for IncompleteLineProgram<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<T> StructuralPartialEq for DebugFrameOffset<T>
impl StructuralPartialEq for DwLnct
impl<T> StructuralPartialEq for DebugStrOffsetsBase<T>
impl<T> StructuralPartialEq for DebugMacroOffset<T>
impl StructuralPartialEq for Encoding
impl StructuralPartialEq for DwEnd
impl StructuralPartialEq for DwVirtuality
impl StructuralPartialEq for FileEntryFormat
impl StructuralPartialEq for Format
impl StructuralPartialEq for DwCc
impl<R> StructuralPartialEq for EvaluationResult<R> where
R: Reader,
impl StructuralPartialEq for DwAddr
impl StructuralPartialEq for AttributeSpecification
impl<T> StructuralPartialEq for DebugAddrIndex<T>
impl<T> StructuralPartialEq for ArangeEntry<T> where
T: Copy,
impl<R, Offset> StructuralPartialEq for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<T> StructuralPartialEq for UnitOffset<T>
impl<T> StructuralPartialEq for RangeListsOffset<T>
impl StructuralPartialEq for DwCfa
impl<T> StructuralPartialEq for DebugMacinfoOffset<T>
impl<R> StructuralPartialEq for RegisterRule<R> where
R: Reader,
impl<'bases, Section, R> StructuralPartialEq for CieOrFde<'bases, Section, R> where
R: Reader,
Section: UnwindSection<R>,
impl StructuralPartialEq for Register
impl<T> StructuralPartialEq for DebugLocListsIndex<T>
impl StructuralPartialEq for SectionId
impl<T> StructuralPartialEq for DieReference<T>
impl StructuralPartialEq for DwLns
impl StructuralPartialEq for DwId
impl<R> StructuralPartialEq for EhFrame<R> where
R: Reader,
impl<T> StructuralPartialEq for DebugAddrBase<T>
impl<R, Offset> StructuralPartialEq for Operation<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl StructuralPartialEq for DwOp
impl StructuralPartialEq for RunTimeEndian
impl StructuralPartialEq for DwLang
impl<R> StructuralPartialEq for CallFrameInstruction<R> where
R: Reader,
impl StructuralPartialEq for ReaderOffsetId
impl<R> StructuralPartialEq for DebugFrame<R> where
R: Reader,
impl<T> StructuralPartialEq for DebugTypesOffset<T>
impl StructuralPartialEq for DwLle
impl StructuralPartialEq for ValueType
impl StructuralPartialEq for LineRow
impl StructuralPartialEq for DwOrd
impl<R, Offset> StructuralPartialEq for Piece<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl StructuralPartialEq for DwMacro
impl StructuralPartialEq for DebugTypeSignature
impl<R> StructuralPartialEq for Expression<R> where
R: Reader,
impl<T> StructuralPartialEq for DebugRngListsIndex<T>
impl<T> StructuralPartialEq for DebugLineStrOffset<T>
impl StructuralPartialEq for Error
impl<T> StructuralPartialEq for DebugLocListsBase<T>
impl<T> StructuralPartialEq for DebugLineOffset<T>
impl StructuralPartialEq for DwDsc
impl StructuralPartialEq for DwVis
impl StructuralPartialEq for DwTag
impl StructuralPartialEq for DwLne
impl StructuralPartialEq for LittleEndian
impl<R, Offset> StructuralPartialEq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl StructuralPartialEq for DwRle
impl StructuralPartialEq for DwAte
impl StructuralPartialEq for Augmentation
impl<R> StructuralPartialEq for UnwindTableRow<R> where
R: Reader,
impl<'input, Endian> StructuralPartialEq for EndianSlice<'input, Endian> where
Endian: Endianity,
impl<R, Offset> StructuralPartialEq for CommonInformationEntry<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R> StructuralPartialEq for EhFrameHdr<R> where
R: Reader,
impl StructuralPartialEq for RelocationTarget
impl<Section> StructuralPartialEq for SymbolFlags<Section>
impl StructuralPartialEq for SectionIndex
impl StructuralPartialEq for BigEndian
impl StructuralPartialEq for BinaryFormat
impl StructuralPartialEq for Error
impl StructuralPartialEq for RelocationKind
impl<'data> StructuralPartialEq for Export<'data>
impl StructuralPartialEq for Architecture
impl StructuralPartialEq for AddressSize
impl StructuralPartialEq for Endianness
impl StructuralPartialEq for SectionFlags
impl StructuralPartialEq for ArchiveKind
impl<'data> StructuralPartialEq for ObjectMapEntry<'data>
impl StructuralPartialEq for LittleEndian
impl StructuralPartialEq for ComdatKind
impl<'data> StructuralPartialEq for Import<'data>
impl<'data> StructuralPartialEq for SymbolMapName<'data>
impl StructuralPartialEq for SymbolKind
impl<'data> StructuralPartialEq for CompressedData<'data>
impl StructuralPartialEq for CompressionFormat
impl<E> StructuralPartialEq for U32Bytes<E> where
E: Endian,
impl<E> StructuralPartialEq for U64Bytes<E> where
E: Endian,
impl StructuralPartialEq for SymbolScope
impl StructuralPartialEq for SymbolIndex
impl<E> StructuralPartialEq for I64Bytes<E> where
E: Endian,
impl<E> StructuralPartialEq for U16Bytes<E> where
E: Endian,
impl<E> StructuralPartialEq for I16Bytes<E> where
E: Endian,
impl<'data> StructuralPartialEq for Bytes<'data>
impl StructuralPartialEq for SymbolSection
impl<E> StructuralPartialEq for I32Bytes<E> where
E: Endian,
impl StructuralPartialEq for RelocationEncoding
impl StructuralPartialEq for SectionKind
impl StructuralPartialEq for FileFlags
impl StructuralPartialEq for TINFLStatus
impl StructuralPartialEq for StreamResult
impl StructuralPartialEq for CompressionStrategy
impl StructuralPartialEq for MZFlush
impl StructuralPartialEq for MZError
impl StructuralPartialEq for CompressionLevel
impl StructuralPartialEq for TDEFLFlush
impl StructuralPartialEq for DataFormat
impl StructuralPartialEq for TDEFLStatus
impl StructuralPartialEq for MZStatus
impl<Header, Extrinsic> StructuralPartialEq for Block<Header, Extrinsic> where
Extrinsic: MaybeSerialize,
impl<Info> StructuralPartialEq for DispatchErrorWithPostInfo<Info> where
Info: Eq + PartialEq<Info> + Clone + Copy + Encode + Decode + Printable,
impl<Address, Call, Signature, Extra> StructuralPartialEq for UncheckedExtrinsic<Address, Call, Signature, Extra> where
Extra: SignedExtension,
impl<Number, Hash> StructuralPartialEq for Header<Number, Hash> where
Hash: Hash,
Number: Copy + Into<U256> + TryFrom<U256>,
Implementors
impl<A: AssetId, B: Balance, OnDrop: HandleImbalanceDrop<A, B>, OppositeOnDrop: HandleImbalanceDrop<A, B>> StructuralPartialEq for frame_support::traits::tokens::fungibles::Imbalance<A, B, OnDrop, OppositeOnDrop>
impl<B: Balance, OnDrop: HandleImbalanceDrop<B>, OppositeOnDrop: HandleImbalanceDrop<B>> StructuralPartialEq for frame_support::traits::tokens::fungible::Imbalance<B, OnDrop, OppositeOnDrop>