StructuralPartialEq

Trait StructuralPartialEq 

Source
pub trait StructuralPartialEq { }
๐Ÿ”ฌThis is a nightly-only experimental API. (structural_match)
Expand description

Required trait for constants used in pattern matches.

Constants are only allowed as patterns if (a) their type implements PartialEq, and (b) interpreting the value of the constant as a pattern is equivalent to calling PartialEq. This ensures that constants used as patterns cannot expose implementation details in an unexpected way or cause semver hazards.

This trait ensures point (b). Any type that derives PartialEq automatically implements this trait.

Implementing this trait (which is unstable) is a way for type authors to explicitly allow comparing const values of this type; that operation will recursively compare all fields (including private fields), even if that behavior differs from PartialEq. This can make it semver-breaking to add further private fields to a type.

Implementorsยง

Sourceยง

impl StructuralPartialEq for byte_slice_cast::Error

Sourceยง

impl StructuralPartialEq for Case

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

Sourceยง

impl StructuralPartialEq for DebugAsHex

Sourceยง

impl StructuralPartialEq for Sign

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.64.0 ยท Sourceยง

impl StructuralPartialEq for FromBytesWithNulError

Sourceยง

impl StructuralPartialEq for AtomicOrdering

Sourceยง

impl StructuralPartialEq for SimdAlign

1.7.0 ยท Sourceยง

impl StructuralPartialEq for IpAddr

Sourceยง

impl StructuralPartialEq for Ipv6MulticastScope

1.0.0 ยท Sourceยง

impl StructuralPartialEq for SocketAddr

1.86.0 ยท Sourceยง

impl StructuralPartialEq for GetDisjointMutError

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 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 TryGetError

Sourceยง

impl StructuralPartialEq for SplicedStr

Sourceยง

impl StructuralPartialEq for OptionBool

Sourceยง

impl StructuralPartialEq for parity_scale_codec::error::Error

Sourceยง

impl StructuralPartialEq for IgnoredAny

Sourceยง

impl StructuralPartialEq for serde_core::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 FormattingOptions

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.64.0 ยท Sourceยง

impl StructuralPartialEq for CStr

1.69.0 ยท Sourceยง

impl StructuralPartialEq for FromBytesUntilNulError

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

Sourceยง

impl StructuralPartialEq for NormalizeError

1.7.0 ยท Sourceยง

impl StructuralPartialEq for StripPrefixError

1.61.0 ยท Sourceยง

impl StructuralPartialEq for ExitCode

1.0.0 ยท Sourceยง

impl StructuralPartialEq for ExitStatus

Sourceยง

impl StructuralPartialEq for ExitStatusError

1.0.0 ยท Sourceยง

impl StructuralPartialEq for Output

1.19.0 ยท Sourceยง

impl StructuralPartialEq for ThreadId

1.26.0 ยท Sourceยง

impl StructuralPartialEq for AccessError

1.33.0 ยท Sourceยง

impl StructuralPartialEq for PhantomPinned

Sourceยง

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

Sourceยง

impl<'a> StructuralPartialEq for Utf8Pattern<'a>

1.0.0 ยท Sourceยง

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

1.0.0 ยท Sourceยง

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

1.79.0 ยท Sourceยง

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

Sourceยง

impl<'a> StructuralPartialEq for PhantomContravariantLifetime<'a>

Sourceยง

impl<'a> StructuralPartialEq for PhantomCovariantLifetime<'a>

Sourceยง

impl<'a> StructuralPartialEq for PhantomInvariantLifetime<'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 scale_info::prelude::ops::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<Idx> StructuralPartialEq for core::range::RangeToInclusive<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>

Sourceยง

impl<T> StructuralPartialEq for SendTimeoutError<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>

Sourceยง

impl<T> StructuralPartialEq for Exclusive<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>