Trait gstd::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 ConversionError
impl StructuralPartialEq for gstd::errors::CoreError
impl StructuralPartialEq for gstd::errors::Error
impl StructuralPartialEq for ErrorReplyReason
impl StructuralPartialEq for ExecutionError
impl StructuralPartialEq for ExtError
impl StructuralPartialEq for MemoryError
impl StructuralPartialEq for MessageError
impl StructuralPartialEq for ReplyCode
impl StructuralPartialEq for ReservationError
impl StructuralPartialEq for SignalCode
impl StructuralPartialEq for SimpleExecutionError
impl StructuralPartialEq for SimpleProgramCreationError
impl StructuralPartialEq for SuccessReplyReason
impl StructuralPartialEq for UsageError
impl StructuralPartialEq for AsciiChar
impl StructuralPartialEq for gstd::prelude::cmp::Ordering
impl StructuralPartialEq for TryReserveErrorKind
impl StructuralPartialEq for gstd::prelude::collections::hashbrown::TryReserveError
impl StructuralPartialEq for gstd::prelude::fmt::Alignment
impl StructuralPartialEq for FpCategory
impl StructuralPartialEq for IntErrorKind
impl StructuralPartialEq for SearchStep
impl StructuralPartialEq for IpAddr
impl StructuralPartialEq for Ipv6MulticastScope
impl StructuralPartialEq for SocketAddr
impl StructuralPartialEq for core::sync::atomic::Ordering
impl StructuralPartialEq for FromHexError
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 gstd::errors::CodecError
impl StructuralPartialEq for ErrorReplyPayload
impl StructuralPartialEq for SyscallError
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
impl StructuralPartialEq for CharTryFromError
impl StructuralPartialEq for DecodeUtf16Error
impl StructuralPartialEq for ParseCharError
impl StructuralPartialEq for TryFromCharError
impl StructuralPartialEq for UnorderedKeyError
impl StructuralPartialEq for gstd::prelude::collections::TryReserveError
impl StructuralPartialEq for CStr
impl StructuralPartialEq for CString
impl StructuralPartialEq for FromBytesUntilNulError
impl StructuralPartialEq for FromBytesWithNulError
impl StructuralPartialEq for FromVecWithNulError
impl StructuralPartialEq for IntoStringError
impl StructuralPartialEq for NulError
impl StructuralPartialEq for gstd::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 gstd::prelude::ptr::Alignment
impl StructuralPartialEq for ParseBoolError
impl StructuralPartialEq for Utf8Error
impl StructuralPartialEq for FromUtf8Error
impl StructuralPartialEq for String
impl StructuralPartialEq for RawWaker
impl StructuralPartialEq for RawWakerVTable
impl StructuralPartialEq for Duration
impl StructuralPartialEq for TryFromFloatSecsError
impl StructuralPartialEq for Layout
impl StructuralPartialEq for LayoutError
impl StructuralPartialEq for core::alloc::AllocError
impl StructuralPartialEq for CpuidResult
impl StructuralPartialEq for Ipv4Addr
impl StructuralPartialEq for Ipv6Addr
impl StructuralPartialEq for AddrParseError
impl StructuralPartialEq for SocketAddrV4
impl StructuralPartialEq for SocketAddrV6
impl StructuralPartialEq for ATerm
impl StructuralPartialEq for B0
impl StructuralPartialEq for B1
impl StructuralPartialEq for Z0
impl StructuralPartialEq for Equal
impl StructuralPartialEq for Greater
impl StructuralPartialEq for Less
impl StructuralPartialEq for UTerm
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
impl<'a> StructuralPartialEq for Location<'a>
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,
impl<B, C> StructuralPartialEq for ControlFlow<B, C>
impl<Idx> StructuralPartialEq for gstd::prelude::ops::Range<Idx>
impl<Idx> StructuralPartialEq for gstd::prelude::ops::RangeFrom<Idx>
impl<Idx> StructuralPartialEq for gstd::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<T> StructuralPartialEq for Option<T>
impl<T> StructuralPartialEq for Bound<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.