Trait sp_std::cmp::Eq 1.0.0[−][src]
Trait for equality comparisons which are equivalence relations.
This means, that in addition to a == b
and a != b
being strict inverses, the equality must
be (for all a
, b
and c
):
- reflexive:
a == a
; - symmetric:
a == b
impliesb == a
; and - transitive:
a == b
andb == c
impliesa == c
.
This property cannot be checked by the compiler, and therefore Eq
implies
PartialEq
, and has no extra methods.
Derivable
This trait can be used with #[derive]
. When derive
d, because Eq
has
no extra methods, it is only informing the compiler that this is an
equivalence relation rather than a partial equivalence relation. Note that
the derive
strategy requires all fields are Eq
, which isn’t
always desired.
How can I implement Eq
?
If you cannot use the derive
strategy, specify that your type implements
Eq
, which has no methods:
enum BookFormat { Paperback, Hardback, Ebook } struct Book { isbn: i32, format: BookFormat, } impl PartialEq for Book { fn eq(&self, other: &Self) -> bool { self.isbn == other.isbn } } impl Eq for Book {}
Implementations on Foreign Types
impl Eq for AccessError
[src]
impl Eq for SystemTime
[src]
impl Eq for Ipv6Addr
[src]
impl Eq for Output
[src]
impl<'a> Eq for Prefix<'a>
[src]
impl Eq for VarError
[src]
impl Eq for Ipv6MulticastScope
[src]
impl<T> Eq for SyncOnceCell<T> where
T: Eq,
[src]
T: Eq,
impl Eq for ErrorKind
[src]
impl Eq for OsString
[src]
impl Eq for UCred
[src]
impl Eq for IpAddr
[src]
impl Eq for FromVecWithNulError
[src]
impl Eq for FromBytesWithNulError
[src]
impl Eq for BacktraceStatus
[src]
impl Eq for NulError
[src]
impl Eq for ThreadId
[src]
impl<K, V, S> Eq for HashMap<K, V, S> where
K: Eq + Hash,
V: Eq,
S: BuildHasher,
[src]
K: Eq + Hash,
V: Eq,
S: BuildHasher,
impl Eq for PathBuf
[src]
impl Eq for Permissions
[src]
impl Eq for ExitStatus
[src]
impl<'a> Eq for Component<'a>
[src]
impl Eq for AddrParseError
[src]
impl Eq for Instant
[src]
impl<T> Eq for Cursor<T> where
T: Eq,
[src]
T: Eq,
impl Eq for SeekFrom
[src]
impl Eq for Shutdown
[src]
impl Eq for SocketAddrV6
[src]
impl Eq for StripPrefixError
[src]
impl<'_> Eq for Components<'_>
[src]
impl Eq for Ipv4Addr
[src]
impl Eq for CString
[src]
impl Eq for IntoStringError
[src]
impl Eq for Path
[src]
impl Eq for FileType
[src]
impl Eq for OsStr
[src]
impl<'a> Eq for PrefixComponent<'a>
[src]
impl Eq for SocketAddr
[src]
impl Eq for SocketAddrV4
[src]
impl<T, S> Eq for HashSet<T, S> where
T: Eq + Hash,
S: BuildHasher,
[src]
T: Eq + Hash,
S: BuildHasher,
impl Eq for CStr
[src]
impl<Ret, A> Eq for unsafe extern "C" fn(A) -> Ret
[src]
impl<Ret, A, B, C> Eq for fn(A, B, C) -> Ret
[src]
impl<Ret, A, B, C> Eq for unsafe extern "C" fn(A, B, C, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G> Eq for extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret
[src]
impl<Ret, A, B, C, D> Eq for extern "C" fn(A, B, C, D, ...) -> Ret
[src]
impl Eq for u32
[src]
impl Eq for Duration
[src]
impl<T> Eq for Poll<T> where
T: Eq,
[src]
T: Eq,
impl<T> Eq for [T] where
T: Eq,
[src]
T: Eq,
impl<Ret, A, B, C, D, E, F> Eq for fn(A, B, C, D, E, F) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H> Eq for unsafe fn(A, B, C, D, E, F, G, H) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Eq for fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
[src]
impl<A, B, C, D, E, F> Eq for (A, B, C, D, E, F) where
C: Eq,
A: Eq,
E: Eq,
F: Eq + ?Sized,
B: Eq,
D: Eq,
[src]
C: Eq,
A: Eq,
E: Eq,
F: Eq + ?Sized,
B: Eq,
D: Eq,
impl Eq for !
[src]
impl<Ret, A, B, C, D, E, F, G, H, I> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret
[src]
impl<T> Eq for *mut T where
T: ?Sized,
[src]
T: ?Sized,
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Eq for unsafe fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
[src]
impl<P> Eq for Pin<P> where
P: Deref,
<P as Deref>::Target: Eq,
[src]
P: Deref,
<P as Deref>::Target: Eq,
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
[src]
impl Eq for i32
[src]
impl<Ret, A, B, C, D> Eq for fn(A, B, C, D) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I> Eq for unsafe fn(A, B, C, D, E, F, G, H, I) -> Ret
[src]
impl<Ret, A, B, C, D> Eq for unsafe extern "C" fn(A, B, C, D, ...) -> Ret
[src]
impl<Ret, A, B, C> Eq for extern "C" fn(A, B, C) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Eq for fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
[src]
impl<Ret, A, B, C, D> Eq for extern "C" fn(A, B, C, D) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Eq for unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
[src]
impl Eq for u64
[src]
impl<T> Eq for OnceCell<T> where
T: Eq,
[src]
T: Eq,
impl<Ret, A, B, C, D, E, F, G, H, I, J> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J> Eq for fn(A, B, C, D, E, F, G, H, I, J) -> Ret
[src]
impl<Ret, A, B, C> Eq for unsafe extern "C" fn(A, B, C) -> Ret
[src]
impl<A> Eq for (A,) where
A: Eq + ?Sized,
[src]
A: Eq + ?Sized,
impl<Ret, A, B, C, D, E> Eq for extern "C" fn(A, B, C, D, E) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
[src]
impl Eq for i64
[src]
impl<'a> Eq for Utf8LossyChunk<'a>
[src]
impl Eq for u8
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
[src]
impl<A, B, C, D, E, F, G, H, I, J, K> Eq for (A, B, C, D, E, F, G, H, I, J, K) where
C: Eq,
A: Eq,
E: Eq,
K: Eq + ?Sized,
F: Eq,
I: Eq,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
J: Eq,
[src]
C: Eq,
A: Eq,
E: Eq,
K: Eq + ?Sized,
F: Eq,
I: Eq,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
J: Eq,
impl<T> Eq for Option<T> where
T: Eq,
[src]
T: Eq,
impl<A, B, C, D, E, F, G, H, I> Eq for (A, B, C, D, E, F, G, H, I) where
C: Eq,
A: Eq,
E: Eq,
F: Eq,
I: Eq + ?Sized,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
[src]
C: Eq,
A: Eq,
E: Eq,
F: Eq,
I: Eq + ?Sized,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G> Eq for extern "C" fn(A, B, C, D, E, F, G) -> Ret
[src]
impl<Ret, A, B, C, D, E> Eq for unsafe extern "C" fn(A, B, C, D, E) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H> Eq for extern "C" fn(A, B, C, D, E, F, G, H) -> Ret
[src]
impl<Ret> Eq for unsafe extern "C" fn() -> Ret
[src]
impl<Ret, A, B> Eq for extern "C" fn(A, B) -> Ret
[src]
impl<Ret> Eq for fn() -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret
[src]
impl<'_, A> Eq for &'_ mut A where
A: Eq + ?Sized,
[src]
A: Eq + ?Sized,
impl<Ret, A, B> Eq for fn(A, B) -> Ret
[src]
impl<Ret, A> Eq for extern "C" fn(A, ...) -> Ret
[src]
impl<'a> Eq for Location<'a>
[src]
impl Eq for CharTryFromError
[src]
impl<Ret, A, B, C, D, E> Eq for unsafe fn(A, B, C, D, E) -> Ret
[src]
impl<A, B, C, D, E, F, G, H> Eq for (A, B, C, D, E, F, G, H) where
C: Eq,
A: Eq,
E: Eq,
F: Eq,
B: Eq,
H: Eq + ?Sized,
D: Eq,
G: Eq,
[src]
C: Eq,
A: Eq,
E: Eq,
F: Eq,
B: Eq,
H: Eq + ?Sized,
D: Eq,
G: Eq,
impl<Ret, A, B, C, D, E, F, G, H, I, J> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F> Eq for unsafe extern "C" fn(A, B, C, D, E, F) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret
[src]
impl<Ret, A> Eq for unsafe fn(A) -> Ret
[src]
impl<Ret, A, B, C, D> Eq for unsafe extern "C" fn(A, B, C, D) -> Ret
[src]
impl<Ret, A, B> Eq for unsafe fn(A, B) -> Ret
[src]
impl<A, B, C, D, E, F, G> Eq for (A, B, C, D, E, F, G) where
C: Eq,
A: Eq,
E: Eq,
F: Eq,
B: Eq,
D: Eq,
G: Eq + ?Sized,
[src]
C: Eq,
A: Eq,
E: Eq,
F: Eq,
B: Eq,
D: Eq,
G: Eq + ?Sized,
impl Eq for ()
[src]
impl<Ret, A, B, C, D, E, F, G> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G) -> Ret
[src]
impl<Ret, A, B, C, D, E> Eq for fn(A, B, C, D, E) -> Ret
[src]
impl<Ret, A> Eq for fn(A) -> Ret
[src]
impl Eq for i128
[src]
impl<Ret, A, B, C, D, E, F, G, H, I> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret
[src]
impl<Ret, A, B, C, D, E, F> Eq for unsafe fn(A, B, C, D, E, F) -> Ret
[src]
impl<A, B, C, D, E, F, G, H, I, J, K, L> Eq for (A, B, C, D, E, F, G, H, I, J, K, L) where
C: Eq,
A: Eq,
E: Eq,
K: Eq,
F: Eq,
I: Eq,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
J: Eq,
L: Eq + ?Sized,
[src]
C: Eq,
A: Eq,
E: Eq,
K: Eq,
F: Eq,
I: Eq,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
J: Eq,
L: Eq + ?Sized,
impl<Ret, A, B, C, D, E, F, G, H> Eq for fn(A, B, C, D, E, F, G, H) -> Ret
[src]
impl<A, B, C, D> Eq for (A, B, C, D) where
C: Eq,
A: Eq,
B: Eq,
D: Eq + ?Sized,
[src]
C: Eq,
A: Eq,
B: Eq,
D: Eq + ?Sized,
impl Eq for ParseCharError
[src]
impl Eq for char
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J> Eq for unsafe fn(A, B, C, D, E, F, G, H, I, J) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H) -> Ret
[src]
impl<Ret, A, B, C, D, E, F> Eq for extern "C" fn(A, B, C, D, E, F) -> Ret
[src]
impl<A, B, C> Eq for (A, B, C) where
C: Eq + ?Sized,
A: Eq,
B: Eq,
[src]
C: Eq + ?Sized,
A: Eq,
B: Eq,
impl<Ret, A, B, C> Eq for unsafe fn(A, B, C) -> Ret
[src]
impl Eq for isize
[src]
impl<T> Eq for *const T where
T: ?Sized,
[src]
T: ?Sized,
impl<'_, A> Eq for &'_ A where
A: Eq + ?Sized,
[src]
A: Eq + ?Sized,
impl Eq for u16
[src]
impl<Ret, A, B, C, D> Eq for unsafe fn(A, B, C, D) -> Ret
[src]
impl<A, B, C, D, E, F, G, H, I, J> Eq for (A, B, C, D, E, F, G, H, I, J) where
C: Eq,
A: Eq,
E: Eq,
F: Eq,
I: Eq,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
J: Eq + ?Sized,
[src]
C: Eq,
A: Eq,
E: Eq,
F: Eq,
I: Eq,
B: Eq,
H: Eq,
D: Eq,
G: Eq,
J: Eq + ?Sized,
impl<Ret, A, B, C, D, E, F, G, H, I> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, ...) -> Ret
[src]
impl<Ret, A, B> Eq for extern "C" fn(A, B, ...) -> Ret
[src]
impl<Ret, A, B, C> Eq for extern "C" fn(A, B, C, ...) -> Ret
[src]
impl<A, B, C, D, E> Eq for (A, B, C, D, E) where
C: Eq,
A: Eq,
E: Eq + ?Sized,
B: Eq,
D: Eq,
[src]
C: Eq,
A: Eq,
E: Eq + ?Sized,
B: Eq,
D: Eq,
impl<Ret, A, B, C, D, E, F> Eq for unsafe extern "C" fn(A, B, C, D, E, F, ...) -> Ret
[src]
impl<Ret, A> Eq for unsafe extern "C" fn(A, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G> Eq for fn(A, B, C, D, E, F, G) -> Ret
[src]
impl Eq for u128
[src]
impl<Ret, A, B, C, D, E, F, G> Eq for unsafe fn(A, B, C, D, E, F, G) -> Ret
[src]
impl Eq for usize
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Eq for unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I> Eq for fn(A, B, C, D, E, F, G, H, I) -> Ret
[src]
impl Eq for DecodeUtf16Error
[src]
impl Eq for CpuidResult
[src]
impl<Ret, A, B, C, D, E, F, G, H, I> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, ...) -> Ret
[src]
impl<Ret> Eq for unsafe fn() -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H> Eq for extern "C" fn(A, B, C, D, E, F, G, H, ...) -> Ret
[src]
impl Eq for str
[src]
impl<Ret, A, B> Eq for unsafe extern "C" fn(A, B) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, J) -> Ret
[src]
impl Eq for i16
[src]
impl<A, B> Eq for (A, B) where
A: Eq,
B: Eq + ?Sized,
[src]
A: Eq,
B: Eq + ?Sized,
impl Eq for i8
[src]
impl<Ret, A> Eq for extern "C" fn(A) -> Ret
[src]
impl<Ret, A, B> Eq for unsafe extern "C" fn(A, B, ...) -> Ret
[src]
impl Eq for NoneError
[src]
impl Eq for bool
[src]
impl<T, const N: usize> Eq for [T; N] where
T: Eq,
[src]
T: Eq,
impl<Ret, A, B, C, D, E> Eq for unsafe extern "C" fn(A, B, C, D, E, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K) -> Ret
[src]
impl<Ret> Eq for extern "C" fn() -> Ret
[src]
impl<Ret, A, B, C, D, E> Eq for extern "C" fn(A, B, C, D, E, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F> Eq for extern "C" fn(A, B, C, D, E, F, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
[src]
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Eq for extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
[src]
impl<T> Eq for LinkedList<T> where
T: Eq,
[src]
T: Eq,
impl Eq for String
[src]
impl Eq for TryReserveError
[src]
impl Eq for FromUtf8Error
[src]
Loading content...Implementors
impl Eq for sp_std::cmp::Ordering
[src]
impl Eq for Infallible
1.34.0[src]
impl Eq for FpCategory
[src]
impl Eq for IntErrorKind
[src]
impl Eq for SearchStep
[src]
impl Eq for sp_std::sync::atomic::Ordering
[src]
impl Eq for RecvTimeoutError
1.12.0[src]
impl Eq for TryRecvError
[src]
impl Eq for AllocError
[src]
impl Eq for Layout
1.28.0[src]
impl Eq for LayoutError
1.50.0[src]
impl Eq for TypeId
[src]
impl Eq for Error
[src]
impl Eq for PhantomPinned
1.33.0[src]
impl Eq for NonZeroI8
1.34.0[src]
impl Eq for NonZeroI16
1.34.0[src]
impl Eq for NonZeroI32
1.34.0[src]
impl Eq for NonZeroI64
1.34.0[src]
impl Eq for NonZeroI128
1.34.0[src]
impl Eq for NonZeroIsize
1.34.0[src]
impl Eq for NonZeroU8
1.28.0[src]
impl Eq for NonZeroU16
1.28.0[src]
impl Eq for NonZeroU32
1.28.0[src]
impl Eq for NonZeroU64
1.28.0[src]
impl Eq for NonZeroU128
1.28.0[src]
impl Eq for NonZeroUsize
1.28.0[src]
impl Eq for ParseFloatError
[src]
impl Eq for ParseIntError
[src]
impl Eq for TryFromIntError
1.34.0[src]
impl Eq for RangeFull
[src]
impl Eq for ParseBoolError
[src]
impl Eq for Utf8Error
[src]
impl Eq for RecvError
[src]
impl Eq for WaitTimeoutResult
1.5.0[src]
impl<'_, B> Eq for Cow<'_, B> where
B: Eq + ToOwned + ?Sized,
[src]
B: Eq + ToOwned + ?Sized,
impl<A> Eq for VecDeque<A> where
A: Eq,
[src]
A: Eq,
impl<Dyn> Eq for DynMetadata<Dyn> where
Dyn: ?Sized,
[src]
Dyn: ?Sized,
impl<H> Eq for BuildHasherDefault<H>
1.29.0[src]
impl<Idx> Eq for Range<Idx> where
Idx: Eq,
[src]
Idx: Eq,
impl<Idx> Eq for RangeFrom<Idx> where
Idx: Eq,
[src]
Idx: Eq,
impl<Idx> Eq for RangeInclusive<Idx> where
Idx: Eq,
1.26.0[src]
Idx: Eq,
impl<Idx> Eq for RangeTo<Idx> where
Idx: Eq,
[src]
Idx: Eq,
impl<Idx> Eq for RangeToInclusive<Idx> where
Idx: Eq,
1.26.0[src]
Idx: Eq,
impl<K, V> Eq for BTreeMap<K, V> where
K: Eq,
V: Eq,
[src]
K: Eq,
V: Eq,
impl<T> Eq for Bound<T> where
T: Eq,
1.17.0[src]
T: Eq,
impl<T> Eq for TrySendError<T> where
T: Eq,
[src]
T: Eq,
impl<T> Eq for Cell<T> where
T: Eq + Copy,
1.2.0[src]
T: Eq + Copy,
impl<T> Eq for RefCell<T> where
T: Eq + ?Sized,
1.2.0[src]
T: Eq + ?Sized,
impl<T> Eq for Reverse<T> where
T: Eq,
1.19.0[src]
T: Eq,
impl<T> Eq for BTreeSet<T> where
T: Eq,
[src]
T: Eq,
impl<T> Eq for PhantomData<T> where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Eq for Discriminant<T>
1.21.0[src]
impl<T> Eq for ManuallyDrop<T> where
T: Eq + ?Sized,
1.20.0[src]
T: Eq + ?Sized,
impl<T> Eq for Wrapping<T> where
T: Eq,
[src]
T: Eq,
impl<T> Eq for NonNull<T> where
T: ?Sized,
1.25.0[src]
T: ?Sized,
impl<T> Eq for Rc<T> where
T: Eq + ?Sized,
[src]
T: Eq + ?Sized,
impl<T> Eq for SendError<T> where
T: Eq,
[src]
T: Eq,
impl<T> Eq for Arc<T> where
T: Eq + ?Sized,
[src]
T: Eq + ?Sized,
impl<T, A> Eq for Box<T, A> where
T: Eq + ?Sized,
A: Allocator,
[src]
T: Eq + ?Sized,
A: Allocator,
impl<T, A> Eq for Vec<T, A> where
T: Eq,
A: Allocator,
[src]
T: Eq,
A: Allocator,
impl<T, E> Eq for Result<T, E> where
T: Eq,
E: Eq,
[src]
T: Eq,
E: Eq,
impl<Y, R> Eq for GeneratorState<Y, R> where
R: Eq,
Y: Eq,
[src]
R: Eq,
Y: Eq,