Trait scale_info::prelude::marker::StructuralPartialEq
source · pub trait StructuralPartialEq { }
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 PartialEq
.
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 an attribute-based design to this trait.
Implementors§
impl StructuralPartialEq for byte_slice_cast::Error
impl StructuralPartialEq for PathError
impl StructuralPartialEq for TypeDefPrimitive
impl StructuralPartialEq for MetaForm
impl StructuralPartialEq for PortableForm
impl StructuralPartialEq for scale_info::prelude::cmp::Ordering
impl StructuralPartialEq for TryReserveErrorKind
impl StructuralPartialEq for scale_info::prelude::fmt::Alignment
impl StructuralPartialEq for FpCategory
impl StructuralPartialEq for IntErrorKind
impl StructuralPartialEq for scale_info::prelude::sync::atomic::Ordering
impl StructuralPartialEq for RecvTimeoutError
impl StructuralPartialEq for TryRecvError
impl StructuralPartialEq for AsciiChar
impl StructuralPartialEq for IpAddr
impl StructuralPartialEq for Ipv6MulticastScope
impl StructuralPartialEq for SocketAddr
impl StructuralPartialEq for SearchStep
impl StructuralPartialEq for BacktraceStatus
impl StructuralPartialEq for VarError
impl StructuralPartialEq for SeekFrom
impl StructuralPartialEq for ErrorKind
impl StructuralPartialEq for Shutdown
impl StructuralPartialEq for BacktraceStyle
impl StructuralPartialEq for _Unwind_Action
impl StructuralPartialEq for _Unwind_Reason_Code
impl StructuralPartialEq for bool
impl StructuralPartialEq for char
impl StructuralPartialEq for i8
impl StructuralPartialEq for i16
impl StructuralPartialEq for i32
impl StructuralPartialEq for i64
impl StructuralPartialEq for i128
impl StructuralPartialEq for isize
impl StructuralPartialEq for str
impl StructuralPartialEq for u8
impl StructuralPartialEq for u16
impl StructuralPartialEq for u32
impl StructuralPartialEq for u64
impl StructuralPartialEq for u128
impl StructuralPartialEq for ()
impl StructuralPartialEq for usize
impl StructuralPartialEq for Lsb0
impl StructuralPartialEq for Msb0
impl StructuralPartialEq for OptionBool
impl StructuralPartialEq for parity_scale_codec::error::Error
impl StructuralPartialEq for IgnoredAny
impl StructuralPartialEq for serde::de::value::Error
impl StructuralPartialEq for Const
impl StructuralPartialEq for Mut
impl StructuralPartialEq for NullPtrError
impl StructuralPartialEq for PortableRegistry
impl StructuralPartialEq for PortableType
impl StructuralPartialEq for Registry
impl StructuralPartialEq for UnorderedKeyError
impl StructuralPartialEq for TryReserveError
impl StructuralPartialEq for scale_info::prelude::fmt::Error
impl StructuralPartialEq for Assume
impl StructuralPartialEq for ParseFloatError
impl StructuralPartialEq for ParseIntError
impl StructuralPartialEq for TryFromIntError
impl StructuralPartialEq for RangeFull
impl StructuralPartialEq for FromUtf8Error
impl StructuralPartialEq for String
impl StructuralPartialEq for RecvError
impl StructuralPartialEq for WaitTimeoutResult
impl StructuralPartialEq for Duration
impl StructuralPartialEq for Instant
impl StructuralPartialEq for SystemTime
impl StructuralPartialEq for TryFromFloatSecsError
impl StructuralPartialEq for CString
impl StructuralPartialEq for FromVecWithNulError
impl StructuralPartialEq for IntoStringError
impl StructuralPartialEq for NulError
impl StructuralPartialEq for Layout
impl StructuralPartialEq for LayoutError
impl StructuralPartialEq for AllocError
impl StructuralPartialEq for CharTryFromError
impl StructuralPartialEq for ParseCharError
impl StructuralPartialEq for DecodeUtf16Error
impl StructuralPartialEq for TryFromCharError
impl StructuralPartialEq for CpuidResult
impl StructuralPartialEq for FromBytesUntilNulError
impl StructuralPartialEq for FromBytesWithNulError
impl StructuralPartialEq for Ipv4Addr
impl StructuralPartialEq for Ipv6Addr
impl StructuralPartialEq for AddrParseError
impl StructuralPartialEq for SocketAddrV4
impl StructuralPartialEq for SocketAddrV6
impl StructuralPartialEq for core::ptr::alignment::Alignment
impl StructuralPartialEq for ParseBoolError
impl StructuralPartialEq for Utf8Error
impl StructuralPartialEq for RawWaker
impl StructuralPartialEq for RawWakerVTable
impl StructuralPartialEq for FileType
impl StructuralPartialEq for Permissions
impl StructuralPartialEq for UCred
impl StructuralPartialEq for StripPrefixError
impl StructuralPartialEq for ExitStatus
impl StructuralPartialEq for ExitStatusError
impl StructuralPartialEq for Output
impl StructuralPartialEq for AccessError
impl StructuralPartialEq for ThreadId
impl StructuralPartialEq for PhantomPinned
impl<'a> StructuralPartialEq for Unexpected<'a>
impl<'a> StructuralPartialEq for Component<'a>
impl<'a> StructuralPartialEq for Prefix<'a>
impl<'a> StructuralPartialEq for Location<'a>
impl<'a> StructuralPartialEq for Utf8Chunk<'a>
impl<'a, T> StructuralPartialEq for CompactRef<'a, T>
impl<'a, T, O> StructuralPartialEq for IterOnes<'a, T, O>
impl<'a, T, O> StructuralPartialEq for IterZeros<'a, T, O>
impl<'a, T: 'a> StructuralPartialEq for Symbol<'a, T>
impl<B, C> StructuralPartialEq for ControlFlow<B, C>
impl<Idx> StructuralPartialEq for scale_info::prelude::ops::Range<Idx>
impl<Idx> StructuralPartialEq for scale_info::prelude::ops::RangeFrom<Idx>
impl<Idx> StructuralPartialEq for scale_info::prelude::ops::RangeInclusive<Idx>
impl<Idx> StructuralPartialEq for RangeTo<Idx>
impl<Idx> StructuralPartialEq for RangeToInclusive<Idx>
impl<Idx> StructuralPartialEq for core::range::Range<Idx>
impl<Idx> StructuralPartialEq for core::range::RangeFrom<Idx>
impl<Idx> StructuralPartialEq for core::range::RangeInclusive<Idx>
impl<Inner> StructuralPartialEq for Frozen<Inner>where
Inner: Mutability,
impl<R> StructuralPartialEq for BitEnd<R>where
R: BitRegister,
impl<R> StructuralPartialEq for BitIdx<R>where
R: BitRegister,
impl<R> StructuralPartialEq for BitIdxError<R>where
R: BitRegister,
impl<R> StructuralPartialEq for BitMask<R>where
R: BitRegister,
impl<R> StructuralPartialEq for BitPos<R>where
R: BitRegister,
impl<R> StructuralPartialEq for BitSel<R>where
R: BitRegister,
impl<T> StructuralPartialEq for BitPtrError<T>where
T: BitStore,
impl<T> StructuralPartialEq for BitSpanError<T>where
T: BitStore,
impl<T> StructuralPartialEq for Bound<T>
impl<T> StructuralPartialEq for TrySendError<T>
impl<T> StructuralPartialEq for Option<T>
impl<T> StructuralPartialEq for Poll<T>
impl<T> StructuralPartialEq for &Twhere
T: ?Sized,
impl<T> StructuralPartialEq for [T]
impl<T> StructuralPartialEq for (T₁, T₂, …, Tₙ)
This trait is implemented for tuples up to twelve items long.