Trait gstd::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ยง

ยง

impl StructuralPartialEq for ConversionError

sourceยง

impl StructuralPartialEq for gstd::errors::CoreError

sourceยง

impl StructuralPartialEq for gstd::errors::Error

sourceยง

impl StructuralPartialEq for ErrorReplyReason

sourceยง

impl StructuralPartialEq for ExecutionError

sourceยง

impl StructuralPartialEq for ExtError

sourceยง

impl StructuralPartialEq for MemoryError

sourceยง

impl StructuralPartialEq for MessageError

sourceยง

impl StructuralPartialEq for ReplyCode

sourceยง

impl StructuralPartialEq for ReservationError

sourceยง

impl StructuralPartialEq for SignalCode

sourceยง

impl StructuralPartialEq for SimpleExecutionError

sourceยง

impl StructuralPartialEq for SimpleProgramCreationError

sourceยง

impl StructuralPartialEq for SuccessReplyReason

sourceยง

impl StructuralPartialEq for UsageError

sourceยง

impl StructuralPartialEq for AsciiChar

1.0.0 ยท sourceยง

impl StructuralPartialEq for gstd::prelude::cmp::Ordering

sourceยง

impl StructuralPartialEq for TryReserveErrorKind

ยง

impl StructuralPartialEq for gstd::prelude::collections::hashbrown::TryReserveError

1.28.0 ยท sourceยง

impl StructuralPartialEq for gstd::prelude::fmt::Alignment

1.0.0 ยท sourceยง

impl StructuralPartialEq for FpCategory

1.55.0 ยท sourceยง

impl StructuralPartialEq for IntErrorKind

sourceยง

impl StructuralPartialEq for SearchStep

1.7.0 ยท sourceยง

impl StructuralPartialEq for IpAddr

sourceยง

impl StructuralPartialEq for Ipv6MulticastScope

1.0.0 ยท sourceยง

impl StructuralPartialEq for SocketAddr

1.0.0 ยท sourceยง

impl StructuralPartialEq for core::sync::atomic::Ordering

sourceยง

impl StructuralPartialEq for FromHexError

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

ยง

impl StructuralPartialEq for gstd::errors::CodecError

sourceยง

impl StructuralPartialEq for ErrorReplyPayload

sourceยง

impl StructuralPartialEq for SyscallError

sourceยง

impl StructuralPartialEq for gstd::msg::MessageHandle

ยง

impl StructuralPartialEq for ActorId

ยง

impl StructuralPartialEq for CodeId

ยง

impl StructuralPartialEq for MessageId

ยง

impl StructuralPartialEq for Percent

ยง

impl StructuralPartialEq for ReservationId

1.34.0 ยท sourceยง

impl StructuralPartialEq for CharTryFromError

1.9.0 ยท sourceยง

impl StructuralPartialEq for DecodeUtf16Error

1.20.0 ยท sourceยง

impl StructuralPartialEq for ParseCharError

1.59.0 ยท sourceยง

impl StructuralPartialEq for TryFromCharError

sourceยง

impl StructuralPartialEq for UnorderedKeyError

1.57.0 ยท sourceยง

impl StructuralPartialEq for gstd::prelude::collections::TryReserveError

1.64.0 ยท sourceยง

impl StructuralPartialEq for CStr

1.64.0 ยท sourceยง

impl StructuralPartialEq for CString

1.69.0 ยท sourceยง

impl StructuralPartialEq for FromBytesUntilNulError

1.64.0 ยท sourceยง

impl StructuralPartialEq for FromBytesWithNulError

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.0.0 ยท sourceยง

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

sourceยง

impl StructuralPartialEq for gstd::prelude::ptr::Alignment

1.0.0 ยท sourceยง

impl StructuralPartialEq for ParseBoolError

1.0.0 ยท sourceยง

impl StructuralPartialEq for Utf8Error

1.0.0 ยท sourceยง

impl StructuralPartialEq for FromUtf8Error

1.0.0 ยท sourceยง

impl StructuralPartialEq for String

1.36.0 ยท sourceยง

impl StructuralPartialEq for RawWaker

1.36.0 ยท sourceยง

impl StructuralPartialEq for RawWakerVTable

1.3.0 ยท sourceยง

impl StructuralPartialEq for Duration

1.66.0 ยท sourceยง

impl StructuralPartialEq for TryFromFloatSecsError

1.28.0 ยท sourceยง

impl StructuralPartialEq for Layout

1.50.0 ยท sourceยง

impl StructuralPartialEq for LayoutError

sourceยง

impl StructuralPartialEq for core::alloc::AllocError

1.27.0 ยท sourceยง

impl StructuralPartialEq for CpuidResult

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 ATerm

sourceยง

impl StructuralPartialEq for B0

sourceยง

impl StructuralPartialEq for B1

sourceยง

impl StructuralPartialEq for Z0

sourceยง

impl StructuralPartialEq for Equal

sourceยง

impl StructuralPartialEq for Greater

sourceยง

impl StructuralPartialEq for Less

sourceยง

impl StructuralPartialEq for UTerm

1.33.0 ยท sourceยง

impl StructuralPartialEq for PhantomPinned

ยง

impl StructuralPartialEq for Aborted

ยง

impl StructuralPartialEq for AllocError

ยง

impl StructuralPartialEq for BigEndian

ยง

impl StructuralPartialEq for Canceled

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for Error

ยง

impl StructuralPartialEq for FromDecStrErr

ยง

impl StructuralPartialEq for FromStrRadixErrKind

ยง

impl StructuralPartialEq for InvalidBufferSize

ยง

impl StructuralPartialEq for InvalidLength

ยง

impl StructuralPartialEq for LittleEndian

ยง

impl StructuralPartialEq for MacError

ยง

impl StructuralPartialEq for MessageHandle

ยง

impl StructuralPartialEq for MetaForm

ยง

impl StructuralPartialEq for OptionBool

ยง

impl StructuralPartialEq for PathError

ยง

impl StructuralPartialEq for PollNext

ยง

impl StructuralPartialEq for PortableForm

ยง

impl StructuralPartialEq for PortableRegistry

ยง

impl StructuralPartialEq for PortableType

ยง

impl StructuralPartialEq for Registry

ยง

impl StructuralPartialEq for TypeDefPrimitive

ยง

impl StructuralPartialEq for U128

ยง

impl StructuralPartialEq for U256

ยง

impl StructuralPartialEq for U512

1.10.0 ยท sourceยง

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

1.79.0 ยท sourceยง

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

ยง

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

ยง

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

1.55.0 ยท sourceยง

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

1.0.0 ยท sourceยง

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

1.0.0 ยท sourceยง

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

1.26.0 ยท sourceยง

impl<Idx> StructuralPartialEq for gstd::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>

1.0.0 ยท sourceยง

impl<T> StructuralPartialEq for Option<T>

1.17.0 ยท sourceยง

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

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>

sourceยง

impl<T> StructuralPartialEq for CapacityError<T>

sourceยง

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

ยง

impl<T> StructuralPartialEq for Compact<T>

ยง

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

ยง

impl<T> StructuralPartialEq for Interner<T>

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

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

ยง

impl<T> StructuralPartialEq for UntrackedSymbol<T>

ยง

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

1.0.0 ยท sourceยง

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

ยง

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

ยง

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

sourceยง

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

sourceยง

impl<U> StructuralPartialEq for NInt<U>
where U: Unsigned + NonZero,

sourceยง

impl<U> StructuralPartialEq for PInt<U>
where U: Unsigned + NonZero,

sourceยง

impl<U, B> StructuralPartialEq for UInt<U, B>

sourceยง

impl<V, A> StructuralPartialEq for TArr<V, A>

sourceยง

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