Trait scale_info::prelude::marker::StructuralPartialEq

source ·
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 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§

source§

impl StructuralPartialEq for byte_slice_cast::Error

source§

impl StructuralPartialEq for PathError

source§

impl StructuralPartialEq for TypeDefPrimitive

source§

impl StructuralPartialEq for MetaForm

source§

impl StructuralPartialEq for PortableForm

1.0.0 · source§

impl StructuralPartialEq for scale_info::prelude::cmp::Ordering

source§

impl StructuralPartialEq for TryReserveErrorKind

1.28.0 · source§

impl StructuralPartialEq for scale_info::prelude::fmt::Alignment

1.0.0 · source§

impl StructuralPartialEq for FpCategory

1.55.0 · source§

impl StructuralPartialEq for IntErrorKind

1.0.0 · source§

impl StructuralPartialEq for scale_info::prelude::sync::atomic::Ordering

1.12.0 · source§

impl StructuralPartialEq for RecvTimeoutError

1.0.0 · source§

impl StructuralPartialEq for TryRecvError

source§

impl StructuralPartialEq for AsciiChar

1.7.0 · source§

impl StructuralPartialEq for IpAddr

source§

impl StructuralPartialEq for Ipv6MulticastScope

1.0.0 · source§

impl StructuralPartialEq for SocketAddr

source§

impl StructuralPartialEq for SearchStep

1.65.0 · source§

impl StructuralPartialEq for BacktraceStatus

1.0.0 · source§

impl StructuralPartialEq for VarError

1.0.0 · source§

impl StructuralPartialEq for SeekFrom

1.0.0 · source§

impl StructuralPartialEq for ErrorKind

1.0.0 · source§

impl StructuralPartialEq for Shutdown

source§

impl StructuralPartialEq for BacktraceStyle

source§

impl StructuralPartialEq for _Unwind_Action

source§

impl StructuralPartialEq for _Unwind_Reason_Code

source§

impl StructuralPartialEq for bool

source§

impl StructuralPartialEq for char

source§

impl StructuralPartialEq for i8

source§

impl StructuralPartialEq for i16

source§

impl StructuralPartialEq for i32

source§

impl StructuralPartialEq for i64

source§

impl StructuralPartialEq for i128

source§

impl StructuralPartialEq for isize

source§

impl StructuralPartialEq for str

source§

impl StructuralPartialEq for u8

source§

impl StructuralPartialEq for u16

source§

impl StructuralPartialEq for u32

source§

impl StructuralPartialEq for u64

source§

impl StructuralPartialEq for u128

source§

impl StructuralPartialEq for ()

source§

impl StructuralPartialEq for usize

source§

impl StructuralPartialEq for Lsb0

source§

impl StructuralPartialEq for Msb0

source§

impl StructuralPartialEq for OptionBool

source§

impl StructuralPartialEq for parity_scale_codec::error::Error

source§

impl StructuralPartialEq for IgnoredAny

source§

impl StructuralPartialEq for serde::de::value::Error

source§

impl StructuralPartialEq for Const

source§

impl StructuralPartialEq for Mut

source§

impl StructuralPartialEq for NullPtrError

source§

impl StructuralPartialEq for PortableRegistry

source§

impl StructuralPartialEq for PortableType

source§

impl StructuralPartialEq for Registry

source§

impl StructuralPartialEq for UnorderedKeyError

1.57.0 · source§

impl StructuralPartialEq for TryReserveError

1.0.0 · source§

impl StructuralPartialEq for scale_info::prelude::fmt::Error

source§

impl StructuralPartialEq for Assume

1.0.0 · source§

impl StructuralPartialEq for ParseFloatError

1.0.0 · source§

impl StructuralPartialEq for ParseIntError

1.34.0 · source§

impl StructuralPartialEq for TryFromIntError

1.0.0 · source§

impl StructuralPartialEq for RangeFull

1.0.0 · source§

impl StructuralPartialEq for FromUtf8Error

1.0.0 · source§

impl StructuralPartialEq for String

1.0.0 · source§

impl StructuralPartialEq for RecvError

1.5.0 · source§

impl StructuralPartialEq for WaitTimeoutResult

1.3.0 · source§

impl StructuralPartialEq for Duration

1.8.0 · source§

impl StructuralPartialEq for Instant

1.8.0 · source§

impl StructuralPartialEq for SystemTime

1.66.0 · source§

impl StructuralPartialEq for TryFromFloatSecsError

1.64.0 · source§

impl StructuralPartialEq for CString

1.64.0 · source§

impl StructuralPartialEq for FromVecWithNulError

1.64.0 · source§

impl StructuralPartialEq for IntoStringError

1.64.0 · source§

impl StructuralPartialEq for NulError

1.28.0 · source§

impl StructuralPartialEq for Layout

1.50.0 · source§

impl StructuralPartialEq for LayoutError

source§

impl StructuralPartialEq for AllocError

1.34.0 · source§

impl StructuralPartialEq for CharTryFromError

1.20.0 · source§

impl StructuralPartialEq for ParseCharError

1.9.0 · source§

impl StructuralPartialEq for DecodeUtf16Error

1.59.0 · source§

impl StructuralPartialEq for TryFromCharError

1.27.0 · source§

impl StructuralPartialEq for CpuidResult

1.69.0 · source§

impl StructuralPartialEq for FromBytesUntilNulError

1.64.0 · source§

impl StructuralPartialEq for FromBytesWithNulError

1.0.0 · source§

impl StructuralPartialEq for Ipv4Addr

1.0.0 · source§

impl StructuralPartialEq for Ipv6Addr

1.0.0 · source§

impl StructuralPartialEq for AddrParseError

1.0.0 · source§

impl StructuralPartialEq for SocketAddrV4

1.0.0 · source§

impl StructuralPartialEq for SocketAddrV6

source§

impl StructuralPartialEq for core::ptr::alignment::Alignment

1.0.0 · source§

impl StructuralPartialEq for ParseBoolError

1.0.0 · source§

impl StructuralPartialEq for Utf8Error

1.36.0 · source§

impl StructuralPartialEq for RawWaker

1.36.0 · source§

impl StructuralPartialEq for RawWakerVTable

1.1.0 · source§

impl StructuralPartialEq for FileType

1.0.0 · source§

impl StructuralPartialEq for Permissions

source§

impl StructuralPartialEq for UCred

1.7.0 · source§

impl StructuralPartialEq for StripPrefixError

1.0.0 · source§

impl StructuralPartialEq for ExitStatus

source§

impl StructuralPartialEq for ExitStatusError

1.0.0 · source§

impl StructuralPartialEq for Output

1.26.0 · source§

impl StructuralPartialEq for AccessError

1.19.0 · source§

impl StructuralPartialEq for ThreadId

1.33.0 · source§

impl StructuralPartialEq for PhantomPinned

source§

impl<'a> StructuralPartialEq for Unexpected<'a>

1.0.0 · source§

impl<'a> StructuralPartialEq for Component<'a>

1.0.0 · source§

impl<'a> StructuralPartialEq for Prefix<'a>

1.10.0 · source§

impl<'a> StructuralPartialEq for Location<'a>

1.79.0 · source§

impl<'a> StructuralPartialEq for Utf8Chunk<'a>

source§

impl<'a, T> StructuralPartialEq for CompactRef<'a, T>

source§

impl<'a, T, O> StructuralPartialEq for IterOnes<'a, T, O>
where T: 'a + BitStore, O: BitOrder,

source§

impl<'a, T, O> StructuralPartialEq for IterZeros<'a, T, O>
where T: 'a + BitStore, O: BitOrder,

source§

impl<'a, T: 'a> StructuralPartialEq for Symbol<'a, T>

1.55.0 · source§

impl<B, C> StructuralPartialEq for ControlFlow<B, C>

1.0.0 · source§

impl<Idx> StructuralPartialEq for scale_info::prelude::ops::Range<Idx>

1.0.0 · source§

impl<Idx> StructuralPartialEq for scale_info::prelude::ops::RangeFrom<Idx>

1.26.0 · source§

impl<Idx> StructuralPartialEq for scale_info::prelude::ops::RangeInclusive<Idx>

1.0.0 · source§

impl<Idx> StructuralPartialEq for RangeTo<Idx>

1.26.0 · source§

impl<Idx> StructuralPartialEq for RangeToInclusive<Idx>

source§

impl<Idx> StructuralPartialEq for core::range::Range<Idx>

source§

impl<Idx> StructuralPartialEq for core::range::RangeFrom<Idx>

source§

impl<Idx> StructuralPartialEq for core::range::RangeInclusive<Idx>

source§

impl<Inner> StructuralPartialEq for Frozen<Inner>
where Inner: Mutability,

source§

impl<R> StructuralPartialEq for BitEnd<R>
where R: BitRegister,

source§

impl<R> StructuralPartialEq for BitIdx<R>
where R: BitRegister,

source§

impl<R> StructuralPartialEq for BitIdxError<R>
where R: BitRegister,

source§

impl<R> StructuralPartialEq for BitMask<R>
where R: BitRegister,

source§

impl<R> StructuralPartialEq for BitPos<R>
where R: BitRegister,

source§

impl<R> StructuralPartialEq for BitSel<R>
where R: BitRegister,

source§

impl<T> StructuralPartialEq for BitPtrError<T>
where T: BitStore,

source§

impl<T> StructuralPartialEq for BitSpanError<T>
where T: BitStore,

1.17.0 · source§

impl<T> StructuralPartialEq for Bound<T>

1.0.0 · source§

impl<T> StructuralPartialEq for TrySendError<T>

1.0.0 · source§

impl<T> StructuralPartialEq for Option<T>

1.36.0 · source§

impl<T> StructuralPartialEq for Poll<T>

source§

impl<T> StructuralPartialEq for &T
where T: ?Sized,

source§

impl<T> StructuralPartialEq for [T]

source§

impl<T> StructuralPartialEq for (T₁, T₂, …, Tₙ)

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

source§

impl<T> StructuralPartialEq for CapacityError<T>

source§

impl<T> StructuralPartialEq for MisalignError<T>

source§

impl<T> StructuralPartialEq for Compact<T>

source§

impl<T> StructuralPartialEq for Interner<T>

source§

impl<T> StructuralPartialEq for UntrackedSymbol<T>

1.19.0 · source§

impl<T> StructuralPartialEq for Reverse<T>

1.20.0 · source§

impl<T> StructuralPartialEq for ManuallyDrop<T>
where T: ?Sized,

source§

impl<T> StructuralPartialEq for NonZero<T>

1.74.0 · source§

impl<T> StructuralPartialEq for Saturating<T>

1.0.0 · source§

impl<T> StructuralPartialEq for Wrapping<T>

1.0.0 · source§

impl<T> StructuralPartialEq for SendError<T>

1.0.0 · source§

impl<T> StructuralPartialEq for Cursor<T>

source§

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

1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

source§

impl<T: Form> StructuralPartialEq for TypeDef<T>

source§

impl<T: Form> StructuralPartialEq for Field<T>

source§

impl<T: Form> StructuralPartialEq for Path<T>

source§

impl<T: Form> StructuralPartialEq for Type<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefArray<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefBitSequence<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefCompact<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefComposite<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefSequence<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefTuple<T>

source§

impl<T: Form> StructuralPartialEq for TypeDefVariant<T>

source§

impl<T: Form> StructuralPartialEq for TypeParameter<T>

source§

impl<T: Form> StructuralPartialEq for Variant<T>

source§

impl<Y, R> StructuralPartialEq for CoroutineState<Y, R>