wasmer_types::lib::std::cmp

Trait Eq

1.0.0 · source
pub trait Eq: PartialEq { }
Available on crate feature std only.
Expand description

Trait for comparisons corresponding to equivalence relations.

The primary difference to PartialEq is the additional requirement for reflexivity. A type that implements PartialEq guarantees that for all a, b and c:

  • symmetric: a == b implies b == a and a != b implies !(a == b)
  • transitive: a == b and b == c implies a == c

Eq, which builds on top of PartialEq also implies:

  • reflexive: a == a

This property cannot be checked by the compiler, and therefore Eq is a trait without methods.

Violating this property is a logic error. The behavior resulting from a logic error is not specified, but users of the trait must ensure that such logic errors do not result in undefined behavior. This means that unsafe code must not rely on the correctness of these methods.

Floating point types such as f32 and f64 implement only PartialEq but not Eq because NaN != NaN.

§Derivable

This trait can be used with #[derive]. When derived, 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 extra 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 {}

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Eq for RelocationKind

source§

impl Eq for RelocationTarget

source§

impl Eq for CustomSectionProtection

source§

impl Eq for Symbol

source§

impl Eq for CpuFeature

source§

impl Eq for CompiledFunctionUnwindInfo

source§

impl Eq for Aarch64Architecture

source§

impl Eq for Architecture

source§

impl Eq for BinaryFormat

source§

impl Eq for CallingConvention

source§

impl Eq for Endianness

source§

impl Eq for Environment

source§

impl Eq for ExportIndex

source§

impl Eq for ExternType

source§

impl Eq for HashAlgorithm

source§

impl Eq for ImportIndex

source§

impl Eq for LibCall

source§

impl Eq for MemoryStyle

source§

impl Eq for ModuleHash

source§

impl Eq for Mutability

source§

impl Eq for OperatingSystem

source§

impl Eq for PointerWidth

source§

impl Eq for TableStyle

source§

impl Eq for TrapCode

source§

impl Eq for Type

source§

impl Eq for Vendor

source§

impl Eq for MemoryError

1.34.0 · source§

impl Eq for Infallible

1.28.0 · source§

impl Eq for wasmer_types::lib::std::fmt::Alignment

1.0.0 · source§

impl Eq for wasmer_types::lib::std::sync::atomic::Ordering

1.12.0 · source§

impl Eq for RecvTimeoutError

1.0.0 · source§

impl Eq for TryRecvError

1.0.0 · source§

impl Eq for wasmer_types::lib::std::cmp::Ordering

source§

impl Eq for TryReserveErrorKind

source§

impl Eq for AsciiChar

1.7.0 · source§

impl Eq for IpAddr

source§

impl Eq for Ipv6MulticastScope

1.0.0 · source§

impl Eq for SocketAddr

1.0.0 · source§

impl Eq for FpCategory

1.55.0 · source§

impl Eq for IntErrorKind

source§

impl Eq for SearchStep

1.65.0 · source§

impl Eq for BacktraceStatus

1.0.0 · source§

impl Eq for VarError

1.0.0 · source§

impl Eq for SeekFrom

1.0.0 · source§

impl Eq for ErrorKind

1.0.0 · source§

impl Eq for Shutdown

source§

impl Eq for BacktraceStyle

source§

impl Eq for hashbrown::TryReserveError

source§

impl Eq for ArchivedIpAddr

source§

impl Eq for ArchivedSocketAddr

source§

impl Eq for OffsetError

source§

impl Eq for CDataModel

source§

impl Eq for Size

source§

impl Eq for ParseError

source§

impl Eq for ArmArchitecture

source§

impl Eq for CustomVendor

source§

impl Eq for Mips32Architecture

source§

impl Eq for Mips64Architecture

source§

impl Eq for Riscv32Architecture

source§

impl Eq for Riscv64Architecture

source§

impl Eq for X86_32Architecture

1.0.0 · source§

impl Eq for bool

1.0.0 · source§

impl Eq for char

1.0.0 · source§

impl Eq for i8

1.0.0 · source§

impl Eq for i16

1.0.0 · source§

impl Eq for i32

1.0.0 · source§

impl Eq for i64

1.0.0 · source§

impl Eq for i128

1.0.0 · source§

impl Eq for isize

source§

impl Eq for !

1.0.0 · source§

impl Eq for str

1.0.0 · source§

impl Eq for u8

1.0.0 · source§

impl Eq for u16

1.0.0 · source§

impl Eq for u32

1.0.0 · source§

impl Eq for u64

1.0.0 · source§

impl Eq for u128

1.0.0 · source§

impl Eq for ()

1.0.0 · source§

impl Eq for usize

source§

impl Eq for FunctionAddressMap

source§

impl Eq for InstructionAddressMap

source§

impl Eq for Compilation

source§

impl Eq for CompiledFunction

source§

impl Eq for CompiledFunctionFrameInfo

source§

impl Eq for Dwarf

source§

impl Eq for FunctionBody

source§

impl Eq for CompileModuleInfo

source§

impl Eq for Relocation

source§

impl Eq for CustomSection

source§

impl Eq for SectionBody

source§

impl Eq for SectionIndex

source§

impl Eq for Target

source§

impl Eq for Bytes

source§

impl Eq for CustomSectionIndex

source§

impl Eq for DataIndex

source§

impl Eq for DataInitializerLocation

source§

impl Eq for ElemIndex

source§

impl Eq for Features

source§

impl Eq for FunctionIndex

source§

impl Eq for FunctionType

source§

impl Eq for GlobalIndex

source§

impl Eq for GlobalType

source§

impl Eq for ImportKey

source§

impl Eq for LocalFunctionIndex

source§

impl Eq for LocalGlobalIndex

source§

impl Eq for LocalMemoryIndex

source§

impl Eq for LocalTableIndex

source§

impl Eq for MemoryIndex

source§

impl Eq for MemoryType

source§

impl Eq for ModuleInfo

source§

impl Eq for OwnedDataInitializer

source§

impl Eq for PageCountOutOfRange

source§

impl Eq for Pages

source§

impl Eq for SignatureIndex

source§

impl Eq for SourceLoc

source§

impl Eq for StoreId

source§

impl Eq for TableIndex

source§

impl Eq for TableInitializer

source§

impl Eq for TableType

source§

impl Eq for TrapInformation

source§

impl Eq for Triple

source§

impl Eq for V128

1.0.0 · source§

impl Eq for TypeId

1.0.0 · source§

impl Eq for wasmer_types::lib::std::fmt::Error

1.33.0 · source§

impl Eq for PhantomPinned

source§

impl Eq for Assume

1.0.0 · source§

impl Eq for RangeFull

source§

impl Eq for wasmer_types::lib::std::ptr::Alignment

1.0.0 · source§

impl Eq for FromUtf8Error

1.0.0 · source§

impl Eq for String

1.0.0 · source§

impl Eq for RecvError

1.5.0 · source§

impl Eq for WaitTimeoutResult

source§

impl Eq for UnorderedKeyError

1.57.0 · source§

impl Eq for alloc::collections::TryReserveError

1.64.0 · source§

impl Eq for CString

1.64.0 · source§

impl Eq for FromVecWithNulError

1.64.0 · source§

impl Eq for IntoStringError

1.64.0 · source§

impl Eq for NulError

1.28.0 · source§

impl Eq for Layout

1.50.0 · source§

impl Eq for LayoutError

source§

impl Eq for AllocError

1.34.0 · source§

impl Eq for CharTryFromError

1.20.0 · source§

impl Eq for ParseCharError

1.9.0 · source§

impl Eq for DecodeUtf16Error

1.59.0 · source§

impl Eq for TryFromCharError

1.27.0 · source§

impl Eq for CpuidResult

1.64.0 · source§

impl Eq for CStr

1.69.0 · source§

impl Eq for FromBytesUntilNulError

1.64.0 · source§

impl Eq for FromBytesWithNulError

1.0.0 · source§

impl Eq for Ipv4Addr

1.0.0 · source§

impl Eq for Ipv6Addr

1.0.0 · source§

impl Eq for AddrParseError

1.0.0 · source§

impl Eq for SocketAddrV4

1.0.0 · source§

impl Eq for SocketAddrV6

1.0.0 · source§

impl Eq for ParseFloatError

1.0.0 · source§

impl Eq for ParseIntError

1.34.0 · source§

impl Eq for TryFromIntError

1.0.0 · source§

impl Eq for ParseBoolError

1.0.0 · source§

impl Eq for core::str::error::Utf8Error

1.3.0 · source§

impl Eq for Duration

1.66.0 · source§

impl Eq for TryFromFloatSecsError

1.0.0 · source§

impl Eq for OsStr

1.0.0 · source§

impl Eq for OsString

1.1.0 · source§

impl Eq for FileType

1.0.0 · source§

impl Eq for Permissions

source§

impl Eq for UCred

1.0.0 · source§

impl Eq for Components<'_>

1.0.0 · source§

impl Eq for Path

1.0.0 · source§

impl Eq for PathBuf

1.7.0 · source§

impl Eq for StripPrefixError

1.0.0 · source§

impl Eq for ExitStatus

source§

impl Eq for ExitStatusError

1.0.0 · source§

impl Eq for Output

1.26.0 · source§

impl Eq for AccessError

1.19.0 · source§

impl Eq for ThreadId

1.8.0 · source§

impl Eq for Instant

1.8.0 · source§

impl Eq for SystemTime

source§

impl Eq for block_buffer::Error

source§

impl Eq for InvalidLength

source§

impl Eq for InvalidBufferSize

source§

impl Eq for getrandom::error::Error

source§

impl Eq for BigEndian<char>

source§

impl Eq for BigEndian<f32>

source§

impl Eq for BigEndian<f64>

source§

impl Eq for BigEndian<i16>

source§

impl Eq for BigEndian<i32>

source§

impl Eq for BigEndian<i64>

source§

impl Eq for BigEndian<i128>

source§

impl Eq for BigEndian<u16>

source§

impl Eq for BigEndian<u32>

source§

impl Eq for BigEndian<u64>

source§

impl Eq for BigEndian<u128>

source§

impl Eq for BigEndian<NonZero<i16>>

source§

impl Eq for BigEndian<NonZero<i32>>

source§

impl Eq for BigEndian<NonZero<i64>>

source§

impl Eq for BigEndian<NonZero<i128>>

source§

impl Eq for BigEndian<NonZero<u16>>

source§

impl Eq for BigEndian<NonZero<u32>>

source§

impl Eq for BigEndian<NonZero<u64>>

source§

impl Eq for BigEndian<NonZero<u128>>

source§

impl Eq for LittleEndian<char>

source§

impl Eq for LittleEndian<f32>

source§

impl Eq for LittleEndian<f64>

source§

impl Eq for LittleEndian<i16>

source§

impl Eq for LittleEndian<i32>

source§

impl Eq for LittleEndian<i64>

source§

impl Eq for LittleEndian<i128>

source§

impl Eq for LittleEndian<u16>

source§

impl Eq for LittleEndian<u32>

source§

impl Eq for LittleEndian<u64>

source§

impl Eq for LittleEndian<u128>

source§

impl Eq for LittleEndian<NonZero<i16>>

source§

impl Eq for LittleEndian<NonZero<i32>>

source§

impl Eq for LittleEndian<NonZero<i64>>

source§

impl Eq for LittleEndian<NonZero<i128>>

source§

impl Eq for LittleEndian<NonZero<u16>>

source§

impl Eq for LittleEndian<NonZero<u32>>

source§

impl Eq for LittleEndian<NonZero<u64>>

source§

impl Eq for LittleEndian<NonZero<u128>>

source§

impl Eq for NativeEndian<char>

source§

impl Eq for NativeEndian<f32>

source§

impl Eq for NativeEndian<f64>

source§

impl Eq for NativeEndian<i16>

source§

impl Eq for NativeEndian<i32>

source§

impl Eq for NativeEndian<i64>

source§

impl Eq for NativeEndian<i128>

source§

impl Eq for NativeEndian<u16>

source§

impl Eq for NativeEndian<u32>

source§

impl Eq for NativeEndian<u64>

source§

impl Eq for NativeEndian<u128>

source§

impl Eq for NativeEndian<NonZero<i16>>

source§

impl Eq for NativeEndian<NonZero<i32>>

source§

impl Eq for NativeEndian<NonZero<i64>>

source§

impl Eq for NativeEndian<NonZero<i128>>

source§

impl Eq for NativeEndian<NonZero<u16>>

source§

impl Eq for NativeEndian<NonZero<u32>>

source§

impl Eq for NativeEndian<NonZero<u64>>

source§

impl Eq for NativeEndian<NonZero<u128>>

source§

impl Eq for ArchivedCString

source§

impl Eq for ArchivedIpv4Addr

source§

impl Eq for ArchivedIpv6Addr

source§

impl Eq for ArchivedSocketAddrV4

source§

impl Eq for ArchivedSocketAddrV6

source§

impl Eq for ArchivedOptionNonZeroI8

source§

impl Eq for ArchivedOptionNonZeroI16

source§

impl Eq for ArchivedOptionNonZeroI32

source§

impl Eq for ArchivedOptionNonZeroI64

source§

impl Eq for ArchivedOptionNonZeroI128

source§

impl Eq for ArchivedOptionNonZeroU8

source§

impl Eq for ArchivedOptionNonZeroU16

source§

impl Eq for ArchivedOptionNonZeroU32

source§

impl Eq for ArchivedOptionNonZeroU64

source§

impl Eq for ArchivedOptionNonZeroU128

source§

impl Eq for ArchivedString

source§

impl Eq for ArchivedDuration

source§

impl Eq for simdutf8::basic::Utf8Error

source§

impl Eq for simdutf8::compat::Utf8Error

source§

impl Eq for DefaultToHost

source§

impl Eq for DefaultToUnknown

source§

impl Eq for ATerm

source§

impl Eq for B0

source§

impl Eq for B1

source§

impl Eq for Z0

source§

impl Eq for Equal

source§

impl Eq for Greater

source§

impl Eq for Less

source§

impl Eq for UTerm

source§

impl<'a> Eq for CompiledFunctionUnwindInfoReference<'a>

1.0.0 · source§

impl<'a> Eq for Component<'a>

1.0.0 · source§

impl<'a> Eq for Prefix<'a>

1.10.0 · source§

impl<'a> Eq for Location<'a>

1.79.0 · source§

impl<'a> Eq for Utf8Chunk<'a>

1.0.0 · source§

impl<'a> Eq for PrefixComponent<'a>

1.0.0 · source§

impl<A> Eq for &A
where A: Eq + ?Sized,

1.0.0 · source§

impl<A> Eq for &mut A
where A: Eq + ?Sized,

1.0.0 · source§

impl<B> Eq for Cow<'_, B>
where B: Eq + ToOwned + ?Sized,

1.55.0 · source§

impl<B, C> Eq for ControlFlow<B, C>
where B: Eq, C: Eq,

source§

impl<Dyn> Eq for wasmer_types::lib::std::ptr::DynMetadata<Dyn>
where Dyn: ?Sized,

source§

impl<Dyn> Eq for ptr_meta::DynMetadata<Dyn>
where Dyn: ?Sized,

1.4.0 · source§

impl<F> Eq for F
where F: FnPtr,

1.29.0 · source§

impl<H> Eq for BuildHasherDefault<H>

1.0.0 · source§

impl<Idx> Eq for wasmer_types::lib::std::ops::Range<Idx>
where Idx: Eq,

1.0.0 · source§

impl<Idx> Eq for wasmer_types::lib::std::ops::RangeFrom<Idx>
where Idx: Eq,

1.26.0 · source§

impl<Idx> Eq for wasmer_types::lib::std::ops::RangeInclusive<Idx>
where Idx: Eq,

1.0.0 · source§

impl<Idx> Eq for RangeTo<Idx>
where Idx: Eq,

1.26.0 · source§

impl<Idx> Eq for RangeToInclusive<Idx>
where Idx: Eq,

source§

impl<Idx> Eq for core::range::Range<Idx>
where Idx: Eq,

source§

impl<Idx> Eq for core::range::RangeFrom<Idx>
where Idx: Eq,

source§

impl<Idx> Eq for core::range::RangeInclusive<Idx>
where Idx: Eq,

source§

impl<K> Eq for ArchivedBTreeSet<K>
where K: Eq,

source§

impl<K> Eq for ArchivedHashSet<K>
where K: Hash + Eq,

source§

impl<K, V> Eq for SecondaryMap<K, V>
where K: EntityRef, V: Clone + PartialEq + Eq,

source§

impl<K, V> Eq for ArchivedBTreeMap<K, V>
where K: Eq, V: Eq,

source§

impl<K, V> Eq for ArchivedHashMap<K, V>
where K: Hash + Eq, V: Eq,

source§

impl<K, V> Eq for Entry<K, V>
where K: Eq, V: Eq,

1.0.0 · source§

impl<K, V, A> Eq for BTreeMap<K, V, A>
where K: Eq, V: Eq, A: Allocator + Clone,

1.0.0 · source§

impl<K, V, S> Eq for std::collections::hash::map::HashMap<K, V, S>
where K: Eq + Hash, V: Eq, S: BuildHasher,

source§

impl<K, V, S> Eq for IndexMap<K, V, S>
where K: Eq + Hash, V: Eq, S: BuildHasher,

source§

impl<K, V, S, A> Eq for hashbrown::map::HashMap<K, V, S, A>
where K: Eq + Hash, V: Eq, S: BuildHasher, A: Allocator + Clone,

source§

impl<K, V: Eq> Eq for PrimaryMap<K, V>
where K: EntityRef + Eq,

1.41.0 · source§

impl<Ptr> Eq for Pin<Ptr>
where Ptr: Deref, <Ptr as Deref>::Target: Eq,

1.17.0 · source§

impl<T> Eq for Bound<T>
where T: Eq,

source§

impl<T> Eq for SendTimeoutError<T>
where T: Eq,

1.0.0 · source§

impl<T> Eq for TrySendError<T>
where T: Eq,

1.0.0 · source§

impl<T> Eq for Option<T>
where T: Eq,

1.36.0 · source§

impl<T> Eq for Poll<T>
where T: Eq,

source§

impl<T> Eq for ArchivedOption<T>
where T: Eq,

1.0.0 · source§

impl<T> Eq for *const T
where T: ?Sized,

1.0.0 · source§

impl<T> Eq for *mut T
where T: ?Sized,

1.0.0 · source§

impl<T> Eq for [T]
where T: Eq,

1.0.0 · source§

impl<T> Eq for (T₁, T₂, …, Tₙ)
where T: Eq + ?Sized,

This trait is implemented for tuples up to twelve items long.

1.2.0 · source§

impl<T> Eq for Cell<T>
where T: Eq + Copy,

1.70.0 · source§

impl<T> Eq for wasmer_types::lib::std::cell::OnceCell<T>
where T: Eq,

1.2.0 · source§

impl<T> Eq for RefCell<T>
where T: Eq + ?Sized,

1.0.0 · source§

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

1.21.0 · source§

impl<T> Eq for Discriminant<T>

1.20.0 · source§

impl<T> Eq for ManuallyDrop<T>
where T: Eq + ?Sized,

1.25.0 · source§

impl<T> Eq for NonNull<T>
where T: ?Sized,

1.0.0 · source§

impl<T> Eq for SendError<T>
where T: Eq,

1.70.0 · source§

impl<T> Eq for OnceLock<T>
where T: Eq,

1.28.0 · source§

impl<T> Eq for NonZero<T>
where T: ZeroablePrimitive + Eq,

1.74.0 · source§

impl<T> Eq for Saturating<T>
where T: Eq,

1.0.0 · source§

impl<T> Eq for Wrapping<T>
where T: Eq,

1.0.0 · source§

impl<T> Eq for Cursor<T>
where T: Eq,

source§

impl<T> Eq for EnumSet<T>
where T: Eq + EnumSetType, <T as EnumSetTypePrivate>::Repr: Eq,

source§

impl<T> Eq for once_cell::unsync::OnceCell<T>
where T: Eq,

source§

impl<T> Eq for ArchivedBox<T>
where T: ArchivePointee + Eq + ?Sized,

source§

impl<T> Eq for ArchivedOptionBox<T>
where T: ArchivePointee + Eq + ?Sized,

source§

impl<T> Eq for ArchivedRange<T>
where T: Eq,

source§

impl<T> Eq for ArchivedRangeFrom<T>
where T: Eq,

source§

impl<T> Eq for ArchivedRangeInclusive<T>
where T: Eq,

source§

impl<T> Eq for ArchivedRangeTo<T>
where T: Eq,

source§

impl<T> Eq for ArchivedRangeToInclusive<T>
where T: Eq,

source§

impl<T> Eq for RawArchivedVec<T>
where T: Eq,

source§

impl<T> Eq for ArchivedVec<T>
where T: Eq,

1.19.0 · source§

impl<T> Eq for Reverse<T>
where T: Eq,

1.0.0 · source§

impl<T, A> Eq for Box<T, A>
where T: Eq + ?Sized, A: Allocator,

1.0.0 · source§

impl<T, A> Eq for Rc<T, A>
where T: Eq + ?Sized, A: Allocator,

1.0.0 · source§

impl<T, A> Eq for Arc<T, A>
where T: Eq + ?Sized, A: Allocator,

1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where T: Eq, A: Allocator,

1.0.0 · source§

impl<T, A> Eq for BTreeSet<T, A>
where T: Eq, A: Allocator + Clone,

1.0.0 · source§

impl<T, A> Eq for LinkedList<T, A>
where T: Eq, A: Allocator,

1.0.0 · source§

impl<T, A> Eq for VecDeque<T, A>
where T: Eq, A: Allocator,

1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where T: Eq, E: Eq,

source§

impl<T, E> Eq for ArchivedResult<T, E>
where T: Eq, E: Eq,

source§

impl<T, F> Eq for ArchivedRc<T, F>
where T: ArchivePointee + Eq + ?Sized,

source§

impl<T, N> Eq for GenericArray<T, N>
where T: Eq, N: ArrayLength<T>,

1.0.0 · source§

impl<T, S> Eq for std::collections::hash::set::HashSet<T, S>
where T: Eq + Hash, S: BuildHasher,

source§

impl<T, S> Eq for IndexSet<T, S>
where T: Eq + Hash, S: BuildHasher,

source§

impl<T, S, A> Eq for hashbrown::set::HashSet<T, S, A>
where T: Eq + Hash, S: BuildHasher, A: Allocator + Clone,

1.0.0 · source§

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

source§

impl<T, const N: usize> Eq for Simd<T, N>

source§

impl<T: Eq + ReservedValue> Eq for PackedOption<T>

source§

impl<T: Eq> Eq for ExportType<T>

source§

impl<T: Eq> Eq for ImportType<T>

source§

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

source§

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

source§

impl<U, B> Eq for UInt<U, B>
where U: Eq, B: Eq,

source§

impl<V, A> Eq for TArr<V, A>
where V: Eq, A: Eq,

source§

impl<Y, R> Eq for CoroutineState<Y, R>
where Y: Eq, R: Eq,