Trait cairo_vm::stdlib::prelude::Eq

1.0.0 · source ·
pub trait Eq: PartialEq { }
Expand description

Trait for comparisons corresponding to equivalence relations.

This means, that in addition to a == b and a != b being strict inverses, the relation must be (for all a, b and c):

  • reflexive: a == a;
  • symmetric: a == b implies b == a (required by PartialEq as well); and
  • transitive: a == b and b == c implies a == c (required by PartialEq as well).

This property cannot be checked by the compiler, and therefore Eq implies PartialEq, and has no extra 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.

Implement Eq in addition to PartialEq if it’s guaranteed that PartialEq::eq(a, a) always returns true (reflexivity), in addition to the symmetric and transitive properties already required by PartialEq.

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 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 Dictionary

source§

impl Eq for BuiltinName

source§

impl Eq for OffsetValue

source§

impl Eq for ApUpdate

source§

impl Eq for FpUpdate

source§

impl Eq for Op1Addr

source§

impl Eq for Opcode

source§

impl Eq for PcUpdate

source§

impl Eq for Register

source§

impl Eq for Res

source§

impl Eq for MaybeRelocatable

source§

impl Eq for ExecScopeError

source§

impl Eq for InsufficientAllocatedCellsError

source§

impl Eq for BuiltinAdditionalData

source§

impl Eq for CairoArg

source§

impl Eq for cairo_vm::with_std::cmp::Ordering

1.34.0 · source§

impl Eq for Infallible

1.28.0 · source§

impl Eq for cairo_vm::with_std::fmt::Alignment

source§

impl Eq for FpCategory

1.55.0 · source§

impl Eq for IntErrorKind

source§

impl Eq for SearchStep

source§

impl Eq for cairo_vm::with_std::sync::atomic::Ordering

1.12.0 · source§

impl Eq for RecvTimeoutError

source§

impl Eq for TryRecvError

source§

impl Eq for TryReserveErrorKind

source§

impl Eq for AsciiChar

source§

impl Eq for Which

1.7.0 · source§

impl Eq for IpAddr

source§

impl Eq for Ipv6MulticastScope

source§

impl Eq for SocketAddr

1.65.0 · source§

impl Eq for BacktraceStatus

source§

impl Eq for VarError

source§

impl Eq for SeekFrom

source§

impl Eq for std::io::error::ErrorKind

source§

impl Eq for Shutdown

source§

impl Eq for BacktraceStyle

source§

impl Eq for AllowedEnumVariants

source§

impl Eq for IntegerType

source§

impl Eq for hashbrown::TryReserveError

source§

impl Eq for nom::error::ErrorKind

source§

impl Eq for Needed

source§

impl Eq for Endianness

source§

impl Eq for Sign

source§

impl Eq for BernoulliError

source§

impl Eq for WeightedError

source§

impl Eq for Category

source§

impl Eq for Value

source§

impl Eq for bool

source§

impl Eq for char

source§

impl Eq for i8

source§

impl Eq for i16

source§

impl Eq for i32

source§

impl Eq for i64

source§

impl Eq for i128

source§

impl Eq for isize

source§

impl Eq for !

source§

impl Eq for str

source§

impl Eq for u8

source§

impl Eq for u16

source§

impl Eq for u32

source§

impl Eq for u64

source§

impl Eq for u128

source§

impl Eq for ()

source§

impl Eq for usize

source§

impl Eq for DictManager

source§

impl Eq for DictTracker

source§

impl Eq for HintReference

source§

impl Eq for ApTracking

source§

impl Eq for Attribute

source§

impl Eq for DebugInfo

source§

impl Eq for FlowTrackingData

source§

impl Eq for HintLocation

source§

impl Eq for HintParams

source§

impl Eq for Identifier

source§

impl Eq for InputFile

source§

impl Eq for InstructionLocation

source§

impl Eq for cairo_vm::serde::deserialize_program::Location

source§

impl Eq for Member

source§

impl Eq for Reference

source§

impl Eq for ReferenceManager

source§

impl Eq for ValueAddress

source§

impl Eq for Instruction

source§

impl Eq for Program

source§

impl Eq for Relocatable

source§

impl Eq for CairoPie

source§

impl Eq for CairoPieMetadata

source§

impl Eq for CairoPieVersion

source§

impl Eq for OutputBuiltinAdditionalData

source§

impl Eq for PublicMemoryPage

source§

impl Eq for cairo_vm::vm::runners::cairo_pie::SegmentInfo

source§

impl Eq for StrippedProgram

source§

impl Eq for ExecutionResources

source§

impl Eq for cairo_vm::vm::runners::cairo_runner::SegmentInfo

source§

impl Eq for TraceEntry

source§

impl Eq for Operands

source§

impl Eq for OperandsAddresses

source§

impl Eq for AllocError

1.28.0 · source§

impl Eq for Layout

1.50.0 · source§

impl Eq for LayoutError

source§

impl Eq for TypeId

source§

impl Eq for cairo_vm::with_std::fmt::Error

1.33.0 · source§

impl Eq for PhantomPinned

source§

impl Eq for Assume

1.34.0 · source§

impl Eq for NonZeroI8

1.34.0 · source§

impl Eq for NonZeroI16

1.34.0 · source§

impl Eq for NonZeroI32

1.34.0 · source§

impl Eq for NonZeroI64

1.34.0 · source§

impl Eq for NonZeroI128

1.34.0 · source§

impl Eq for NonZeroIsize

1.28.0 · source§

impl Eq for NonZeroU8

1.28.0 · source§

impl Eq for NonZeroU16

1.28.0 · source§

impl Eq for NonZeroU32

1.28.0 · source§

impl Eq for NonZeroU64

1.28.0 · source§

impl Eq for NonZeroU128

1.28.0 · source§

impl Eq for NonZeroUsize

source§

impl Eq for ParseFloatError

source§

impl Eq for ParseIntError

1.34.0 · source§

impl Eq for TryFromIntError

source§

impl Eq for RangeFull

source§

impl Eq for cairo_vm::with_std::ptr::Alignment

source§

impl Eq for ParseBoolError

source§

impl Eq for Utf8Error

source§

impl Eq for FromUtf8Error

source§

impl Eq for RecvError

1.5.0 · source§

impl Eq for WaitTimeoutResult

1.3.0 · source§

impl Eq for Duration

1.66.0 · source§

impl Eq for TryFromFloatSecsError

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.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

source§

impl Eq for CStr

1.69.0 · source§

impl Eq for FromBytesUntilNulError

1.64.0 · source§

impl Eq for FromBytesWithNulError

source§

impl Eq for Ipv4Addr

source§

impl Eq for Ipv6Addr

source§

impl Eq for AddrParseError

source§

impl Eq for SocketAddrV4

source§

impl Eq for SocketAddrV6

source§

impl Eq for OsStr

source§

impl Eq for OsString

1.1.0 · source§

impl Eq for FileType

source§

impl Eq for Permissions

source§

impl Eq for UCred

source§

impl Eq for Components<'_>

source§

impl Eq for Path

source§

impl Eq for PathBuf

1.7.0 · source§

impl Eq for StripPrefixError

source§

impl Eq for ExitStatus

source§

impl Eq for ExitStatusError

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 Lsb0

source§

impl Eq for Msb0

source§

impl Eq for Felt252

source§

impl Eq for ParseFeltError

source§

impl Eq for getrandom::error::Error

source§

impl Eq for num_bigint::bigint::BigInt

source§

impl Eq for BigUint

source§

impl Eq for ParseBigIntError

source§

impl Eq for StepRng

source§

impl Eq for SmallRng

source§

impl Eq for StdRng

source§

impl Eq for Map<String, Value>

source§

impl Eq for Number

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 Eq for ChaCha8Core

source§

impl Eq for ChaCha8Rng

source§

impl Eq for ChaCha12Core

source§

impl Eq for ChaCha12Rng

source§

impl Eq for ChaCha20Core

source§

impl Eq for ChaCha20Rng

source§

impl Eq for String

§

impl Eq for AffinePoint

§

impl Eq for Compress

§

impl Eq for Const

§

impl Eq for EmptyFlags

§

impl Eq for Error

§

impl Eq for ErrorKind

§

impl Eq for FieldElement

§

impl Eq for InvalidBufferSize

§

impl Eq for InvalidLength

§

impl Eq for LegendreSymbol

§

impl Eq for Limb

§

impl Eq for MacError

§

impl Eq for Mut

§

impl Eq for NullPtrError

§

impl Eq for ProjectivePoint

§

impl Eq for Reciprocal

§

impl Eq for Validate

§

impl Eq for udouble

§

impl Eq for vec128_storage

§

impl Eq for vec256_storage

§

impl Eq for vec512_storage

source§

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

source§

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

source§

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

1.10.0 · source§

impl<'a> Eq for core::panic::location::Location<'a>

source§

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

source§

impl<'a, T, O> Eq for IterOnes<'a, T, O>where T: Eq + 'a + BitStore, O: Eq + BitOrder,

source§

impl<'a, T, O> Eq for IterZeros<'a, T, O>where T: Eq + 'a + BitStore, O: Eq + BitOrder,

source§

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

source§

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

source§

impl<A> Eq for ExtendedGcd<A>where A: Eq,

source§

impl<A, O> Eq for BitArray<A, O>where A: BitViewSized, O: BitOrder,

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 DynMetadata<Dyn>where Dyn: ?Sized,

source§

impl<E> Eq for Err<E>where E: Eq,

1.4.0 · source§

impl<F> Eq for Fwhere F: FnPtr,

1.29.0 · source§

impl<H> Eq for BuildHasherDefault<H>

source§

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

source§

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

1.26.0 · source§

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

source§

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

1.26.0 · source§

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

§

impl<Inner> Eq for Frozen<Inner>where Inner: Eq + Mutability,

source§

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

source§

impl<K, V, S> Eq for cairo_vm::with_std::collections::HashMap<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<L, R> Eq for Either<L, R>where L: Eq, R: Eq,

§

impl<M, T> Eq for Address<M, T>where M: Mutability,

source§

impl<M, T, O> Eq for BitRef<'_, M, T, O>where M: Mutability, T: BitStore, O: BitOrder,

source§

impl<M, T, O> Eq for BitPtrRange<M, T, O>where M: Mutability, T: BitStore, O: BitOrder,

source§

impl<M, T, O> Eq for BitPtr<M, T, O>where M: Mutability, T: BitStore, O: BitOrder,

§

impl<MOD, const LIMBS: usize> Eq for Residue<MOD, LIMBS>where MOD: Eq + ResidueParams<LIMBS>,

1.41.0 · source§

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

§

impl<P> Eq for CubicExtField<P>where P: CubicExtConfig,

§

impl<P> Eq for QuadExtField<P>where P: QuadExtConfig,

§

impl<P, const N: usize> Eq for Fp<P, N>where P: FpConfig<N>,

source§

impl<R> Eq for BitEnd<R>where R: Eq + BitRegister,

source§

impl<R> Eq for BitIdx<R>where R: Eq + BitRegister,

source§

impl<R> Eq for BitIdxError<R>where R: Eq + BitRegister,

source§

impl<R> Eq for BitMask<R>where R: Eq + BitRegister,

source§

impl<R> Eq for BitPos<R>where R: Eq + BitRegister,

source§

impl<R> Eq for BitSel<R>where R: Eq + BitRegister,

1.17.0 · source§

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

source§

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

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 BitPtrError<T>where T: Eq + BitStore,

source§

impl<T> Eq for BitSpanError<T>where T: Eq + BitStore,

source§

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

source§

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

source§

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

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 cairo_vm::with_std::cell::OnceCell<T>where T: Eq,

1.2.0 · source§

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

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.74.0 · source§

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

source§

impl<T> Eq for cairo_vm::with_std::num::Wrapping<T>where T: Eq,

1.25.0 · source§

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

source§

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

1.70.0 · source§

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

source§

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

source§

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

source§

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

1.19.0 · source§

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

§

impl<T> Eq for CtOutput<T>where T: OutputSizeUser,

§

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

§

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

§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T, O> Eq for BitBox<T, O>where T: BitStore, O: BitOrder,

source§

impl<T, O> Eq for BitSlice<T, O>where T: BitStore, O: BitOrder,

source§

impl<T, O> Eq for BitVec<T, O>where T: BitStore, O: BitOrder,

source§

impl<T, R> Eq for Mint<T, R>where T: Integer + Clone, R: Reducer<T>,

source§

impl<T, S> Eq for cairo_vm::with_std::collections::HashSet<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,

source§

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

source§

impl<T, const N: usize> Eq for Simd<T, N>where LaneCount<N>: SupportedLaneCount, T: SimdElement + Eq,

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,

§

impl<Z> Eq for Zeroizing<Z>where Z: Eq + Zeroize,

§

impl<const LIMBS: usize> Eq for DynResidue<LIMBS>

§

impl<const LIMBS: usize> Eq for DynResidueParams<LIMBS>

§

impl<const LIMBS: usize> Eq for Uint<LIMBS>

§

impl<const N: usize> Eq for BigInt<N>