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 BacktraceStatus
impl StructuralPartialEq for VarError
impl StructuralPartialEq for SeekFrom
impl StructuralPartialEq for ErrorKind
impl StructuralPartialEq for Shutdown
impl StructuralPartialEq for BacktraceStyle
impl StructuralPartialEq for RecvTimeoutError
impl StructuralPartialEq for TryRecvError
impl StructuralPartialEq for _Unwind_Action
impl StructuralPartialEq for _Unwind_Reason_Code
impl StructuralPartialEq for FromHexError
impl StructuralPartialEq for BernoulliError
impl StructuralPartialEq for WeightedError
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 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 WaitTimeoutResult
impl StructuralPartialEq for RecvError
impl StructuralPartialEq for AccessError
impl StructuralPartialEq for ThreadId
impl StructuralPartialEq for Instant
impl StructuralPartialEq for SystemTime
impl StructuralPartialEq for getrandom::error::Error
impl StructuralPartialEq for IgnoredAny
impl StructuralPartialEq for serde::de::value::Error
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 Bernoulli
impl StructuralPartialEq for StepRng
impl StructuralPartialEq for SmallRng
impl StructuralPartialEq for StdRng
impl StructuralPartialEq for ChaCha8Core
impl StructuralPartialEq for ChaCha12Core
impl StructuralPartialEq for ChaCha20Core
impl StructuralPartialEq for PhantomPinned
impl StructuralPartialEq for Aborted
impl StructuralPartialEq for AllocError
impl StructuralPartialEq for BigEndian
impl StructuralPartialEq for Canceled
impl StructuralPartialEq for Const
impl StructuralPartialEq for Dl_info
impl StructuralPartialEq for Elf32_Chdr
impl StructuralPartialEq for Elf32_Ehdr
impl StructuralPartialEq for Elf32_Phdr
impl StructuralPartialEq for Elf32_Shdr
impl StructuralPartialEq for Elf32_Sym
impl StructuralPartialEq for Elf64_Chdr
impl StructuralPartialEq for Elf64_Ehdr
impl StructuralPartialEq for Elf64_Phdr
impl StructuralPartialEq for Elf64_Shdr
impl StructuralPartialEq for Elf64_Sym
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 Error
impl StructuralPartialEq for FromDecStrErr
impl StructuralPartialEq for FromStrRadixErrKind
impl StructuralPartialEq for InvalidBufferSize
impl StructuralPartialEq for InvalidLength
impl StructuralPartialEq for LittleEndian
impl StructuralPartialEq for Lsb0
impl StructuralPartialEq for MacError
impl StructuralPartialEq for MessageHandle
impl StructuralPartialEq for MetaForm
impl StructuralPartialEq for Msb0
impl StructuralPartialEq for Mut
impl StructuralPartialEq for NullPtrError
impl StructuralPartialEq for ObjectIdentifier
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 SendError
impl StructuralPartialEq for TypeDefPrimitive
impl StructuralPartialEq for U128
impl StructuralPartialEq for U256
impl StructuralPartialEq for U512
impl StructuralPartialEq for __c_anonymous_ifru_map
impl StructuralPartialEq for __c_anonymous_ptrace_syscall_info_entry
impl StructuralPartialEq for __c_anonymous_ptrace_syscall_info_exit
impl StructuralPartialEq for __c_anonymous_ptrace_syscall_info_seccomp
impl StructuralPartialEq for __c_anonymous_sockaddr_can_j1939
impl StructuralPartialEq for __c_anonymous_sockaddr_can_tp
impl StructuralPartialEq for __exit_status
impl StructuralPartialEq for __timeval
impl StructuralPartialEq for _libc_fpstate
impl StructuralPartialEq for _libc_fpxreg
impl StructuralPartialEq for _libc_xmmreg
impl StructuralPartialEq for addrinfo
impl StructuralPartialEq for aiocb
impl StructuralPartialEq for arpd_request
impl StructuralPartialEq for arphdr
impl StructuralPartialEq for arpreq
impl StructuralPartialEq for arpreq_old
impl StructuralPartialEq for can_filter
impl StructuralPartialEq for clone_args
impl StructuralPartialEq for cmsghdr
impl StructuralPartialEq for cpu_set_t
impl StructuralPartialEq for dl_phdr_info
impl StructuralPartialEq for dqblk
impl StructuralPartialEq for fanotify_event_metadata
impl StructuralPartialEq for fanotify_response
impl StructuralPartialEq for fd_set
impl StructuralPartialEq for ff_condition_effect
impl StructuralPartialEq for ff_constant_effect
impl StructuralPartialEq for ff_effect
impl StructuralPartialEq for ff_envelope
impl StructuralPartialEq for ff_periodic_effect
impl StructuralPartialEq for ff_ramp_effect
impl StructuralPartialEq for ff_replay
impl StructuralPartialEq for ff_rumble_effect
impl StructuralPartialEq for ff_trigger
impl StructuralPartialEq for file_clone_range
impl StructuralPartialEq for flock
impl StructuralPartialEq for flock64
impl StructuralPartialEq for fsid_t
impl StructuralPartialEq for genlmsghdr
impl StructuralPartialEq for glob64_t
impl StructuralPartialEq for glob_t
impl StructuralPartialEq for group
impl StructuralPartialEq for hostent
impl StructuralPartialEq for if_nameindex
impl StructuralPartialEq for ifaddrs
impl StructuralPartialEq for in6_addr
impl StructuralPartialEq for in6_ifreq
impl StructuralPartialEq for in6_pktinfo
impl StructuralPartialEq for in6_rtmsg
impl StructuralPartialEq for in_addr
impl StructuralPartialEq for in_pktinfo
impl StructuralPartialEq for inotify_event
impl StructuralPartialEq for input_absinfo
impl StructuralPartialEq for input_event
impl StructuralPartialEq for input_id
impl StructuralPartialEq for input_keymap_entry
impl StructuralPartialEq for input_mask
impl StructuralPartialEq for iocb
impl StructuralPartialEq for iovec
impl StructuralPartialEq for ip_mreq
impl StructuralPartialEq for ip_mreq_source
impl StructuralPartialEq for ip_mreqn
impl StructuralPartialEq for ipc_perm
impl StructuralPartialEq for ipv6_mreq
impl StructuralPartialEq for itimerspec
impl StructuralPartialEq for itimerval
impl StructuralPartialEq for j1939_filter
impl StructuralPartialEq for lconv
impl StructuralPartialEq for linger
impl StructuralPartialEq for mallinfo
impl StructuralPartialEq for mallinfo2
impl StructuralPartialEq for mcontext_t
impl StructuralPartialEq for mmsghdr
impl StructuralPartialEq for mntent
impl StructuralPartialEq for msghdr
impl StructuralPartialEq for msginfo
impl StructuralPartialEq for msqid_ds
impl StructuralPartialEq for nl_mmap_hdr
impl StructuralPartialEq for nl_mmap_req
impl StructuralPartialEq for nl_pktinfo
impl StructuralPartialEq for nlattr
impl StructuralPartialEq for nlmsgerr
impl StructuralPartialEq for nlmsghdr
impl StructuralPartialEq for ntptimeval
impl StructuralPartialEq for open_how
impl StructuralPartialEq for option
impl StructuralPartialEq for packet_mreq
impl StructuralPartialEq for passwd
impl StructuralPartialEq for pollfd
impl StructuralPartialEq for posix_spawn_file_actions_t
impl StructuralPartialEq for posix_spawnattr_t
impl StructuralPartialEq for protoent
impl StructuralPartialEq for pthread_attr_t
impl StructuralPartialEq for pthread_barrierattr_t
impl StructuralPartialEq for pthread_condattr_t
impl StructuralPartialEq for pthread_mutexattr_t
impl StructuralPartialEq for pthread_rwlockattr_t
impl StructuralPartialEq for ptrace_peeksiginfo_args
impl StructuralPartialEq for ptrace_rseq_configuration
impl StructuralPartialEq for ptrace_syscall_info
impl StructuralPartialEq for regex_t
impl StructuralPartialEq for regmatch_t
impl StructuralPartialEq for rlimit
impl StructuralPartialEq for rlimit64
impl StructuralPartialEq for rtentry
impl StructuralPartialEq for rusage
impl StructuralPartialEq for sched_param
impl StructuralPartialEq for sctp_authinfo
impl StructuralPartialEq for sctp_initmsg
impl StructuralPartialEq for sctp_nxtinfo
impl StructuralPartialEq for sctp_prinfo
impl StructuralPartialEq for sctp_rcvinfo
impl StructuralPartialEq for sctp_sndinfo
impl StructuralPartialEq for sctp_sndrcvinfo
impl StructuralPartialEq for seccomp_data
impl StructuralPartialEq for seccomp_notif
impl StructuralPartialEq for seccomp_notif_addfd
impl StructuralPartialEq for seccomp_notif_resp
impl StructuralPartialEq for seccomp_notif_sizes
impl StructuralPartialEq for sem_t
impl StructuralPartialEq for sembuf
impl StructuralPartialEq for semid_ds
impl StructuralPartialEq for seminfo
impl StructuralPartialEq for servent
impl StructuralPartialEq for shmid_ds
impl StructuralPartialEq for sigaction
impl StructuralPartialEq for siginfo_t
impl StructuralPartialEq for signalfd_siginfo
impl StructuralPartialEq for sigset_t
impl StructuralPartialEq for sigval
impl StructuralPartialEq for sock_extended_err
impl StructuralPartialEq for sock_filter
impl StructuralPartialEq for sock_fprog
impl StructuralPartialEq for sockaddr
impl StructuralPartialEq for sockaddr_in
impl StructuralPartialEq for sockaddr_in6
impl StructuralPartialEq for sockaddr_ll
impl StructuralPartialEq for sockaddr_vm
impl StructuralPartialEq for sockaddr_xdp
impl StructuralPartialEq for spwd
impl StructuralPartialEq for stack_t
impl StructuralPartialEq for stat
impl StructuralPartialEq for stat64
impl StructuralPartialEq for statfs
impl StructuralPartialEq for statfs64
impl StructuralPartialEq for statvfs
impl StructuralPartialEq for statvfs64
impl StructuralPartialEq for statx
impl StructuralPartialEq for statx_timestamp
impl StructuralPartialEq for sysinfo
impl StructuralPartialEq for termios
impl StructuralPartialEq for termios2
impl StructuralPartialEq for timespec
impl StructuralPartialEq for timeval
impl StructuralPartialEq for timex
impl StructuralPartialEq for tls12_crypto_info_aes_gcm_128
impl StructuralPartialEq for tls12_crypto_info_aes_gcm_256
impl StructuralPartialEq for tls12_crypto_info_chacha20_poly1305
impl StructuralPartialEq for tls_crypto_info
impl StructuralPartialEq for tm
impl StructuralPartialEq for tms
impl StructuralPartialEq for ucred
impl StructuralPartialEq for uinput_abs_setup
impl StructuralPartialEq for uinput_ff_erase
impl StructuralPartialEq for uinput_ff_upload
impl StructuralPartialEq for user
impl StructuralPartialEq for user_regs_struct
impl StructuralPartialEq for utimbuf
impl StructuralPartialEq for winsize
impl StructuralPartialEq for xdp_desc
impl StructuralPartialEq for xdp_mmap_offsets
impl StructuralPartialEq for xdp_mmap_offsets_v1
impl StructuralPartialEq for xdp_options
impl StructuralPartialEq for xdp_ring_offset
impl StructuralPartialEq for xdp_ring_offset_v1
impl StructuralPartialEq for xdp_statistics
impl StructuralPartialEq for xdp_statistics_v1
impl StructuralPartialEq for xdp_umem_reg
impl StructuralPartialEq for xdp_umem_reg_v1
impl<'a> StructuralPartialEq for Component<'a>
impl<'a> StructuralPartialEq for Prefix<'a>
impl<'a> StructuralPartialEq for Unexpected<'a>
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<'a, T, O> StructuralPartialEq for IterOnes<'a, T, O>where
T: 'a + BitStore,
O: BitOrder,
impl<'a, T, O> StructuralPartialEq for IterZeros<'a, T, O>where
T: 'a + BitStore,
O: BitOrder,
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<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 Option<T>
impl<T> StructuralPartialEq for Bound<T>
impl<T> StructuralPartialEq for Poll<T>
impl<T> StructuralPartialEq for std::sync::mpsc::TrySendError<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.