Movatterモバイル変換


[0]ホーム

URL:


PartialEq

std::cmp

TraitPartialEq 

1.0.0 (const:unstable) ·Source
pub trait PartialEq<Rhs = Self>
where Rhs: ?Sized,
{ // Required method fneq(&self, other:&Rhs) ->bool; // Provided method fnne(&self, other:&Rhs) ->bool { ... }}
Expand description

Trait for comparisons using the equality operator.

Implementing this trait for types provides the== and!= operators forthose types.

x.eq(y) can also be writtenx == y, andx.ne(y) can be writtenx != y.We use the easier-to-read infix notation in the remainder of this documentation.

This trait allows for comparisons using the equality operator, for typesthat do not have a full equivalence relation. For example, in floating pointnumbersNaN != NaN, so floating point types implementPartialEq but notEq. Formally speaking, whenRhs == Self, this trait correspondsto apartial equivalence relation.

Implementations must ensure thateq andne are consistent with each other:

  • a != b if and only if!(a == b).

The default implementation ofne provides this consistency and is almostalways sufficient. It should not be overridden without very good reason.

IfPartialOrd orOrd are also implemented forSelf andRhs, their methods must alsobe consistent withPartialEq (see the documentation of those traits for the exactrequirements). It’s easy to accidentally make them disagree by deriving some of the traits andmanually implementing others.

The equality relation== must satisfy the following conditions(for alla,b,c of typeA,B,C):

  • Symmetry: ifA: PartialEq<B> andB: PartialEq<A>, thena == bimpliesb == a; and

  • Transitivity: ifA: PartialEq<B> andB: PartialEq<C> andA: PartialEq<C>, thena == b andb == c impliesa == c.This must also work for longer chains, such as whenA: PartialEq<B>,B: PartialEq<C>,C: PartialEq<D>, andA: PartialEq<D> all exist.

Note that theB: PartialEq<A> (symmetric) andA: PartialEq<C>(transitive) impls are not forced to exist, but these requirements applywhenever they do exist.

Violating these requirements is a logic error. The behavior resulting from a logic error is notspecified, but users of the trait must ensure that such logic errors donot result inundefined behavior. This means thatunsafe codemust not rely on the correctness of thesemethods.

§Cross-crate considerations

Upholding the requirements stated above can become tricky when one crate implementsPartialEqfor a type of another crate (i.e., to allow comparing one of its own types with a type from thestandard library). The recommendation is to never implement this trait for a foreign type. Inother words, such a crate should doimpl PartialEq<ForeignType> for LocalType, but it shouldnot doimpl PartialEq<LocalType> for ForeignType.

This avoids the problem of transitive chains that criss-cross crate boundaries: for all localtypesT, you may assume that no other crate will addimpls that allow comparingT == U. Inother words, if other crates addimpls that allow building longer transitive chainsU1 == ... == T == V1 == ..., then all the types that appear to the right ofT must be types that thecrate definingT already knows about. This rules out transitive chains where downstream cratescan add newimpls that “stitch together” comparisons of foreign types in ways that violatetransitivity.

Not having such foreignimpls also avoids forward compatibility issues where one crate addingmorePartialEq implementations can cause build failures in downstream crates.

§Derivable

This trait can be used with#[derive]. Whenderived on structs, twoinstances are equal if all fields are equal, and not equal if any fieldsare not equal. Whenderived on enums, two instances are equal if theyare the same variant and all fields are equal.

§How can I implementPartialEq?

An example implementation for a domain in which two books are consideredthe same book if their ISBN matches, even if the formats differ:

enumBookFormat {    Paperback,    Hardback,    Ebook,}structBook {    isbn: i32,    format: BookFormat,}implPartialEqforBook {fneq(&self, other:&Self) -> bool {self.isbn == other.isbn    }}letb1 = Book { isbn:3, format: BookFormat::Paperback };letb2 = Book { isbn:3, format: BookFormat::Ebook };letb3 = Book { isbn:10, format: BookFormat::Paperback };assert!(b1 == b2);assert!(b1 != b3);

§How can I compare two different types?

The type you can compare with is controlled byPartialEq’s type parameter.For example, let’s tweak our previous code a bit:

// The derive implements <BookFormat> == <BookFormat> comparisons#[derive(PartialEq)]enumBookFormat {    Paperback,    Hardback,    Ebook,}structBook {    isbn: i32,    format: BookFormat,}// Implement <Book> == <BookFormat> comparisonsimplPartialEq<BookFormat>forBook {fneq(&self, other:&BookFormat) -> bool {self.format ==*other    }}// Implement <BookFormat> == <Book> comparisonsimplPartialEq<Book>forBookFormat {fneq(&self, other:&Book) -> bool {*self== other.format    }}letb1 = Book { isbn:3, format: BookFormat::Paperback };assert!(b1 == BookFormat::Paperback);assert!(BookFormat::Ebook != b1);

By changingimpl PartialEq for Book toimpl PartialEq<BookFormat> for Book,we allowBookFormats to be compared withBooks.

A comparison like the one above, which ignores some fields of the struct,can be dangerous. It can easily lead to an unintended violation of therequirements for a partial equivalence relation. For example, if we keptthe above implementation ofPartialEq<Book> forBookFormat and added animplementation ofPartialEq<Book> forBook (either via a#[derive] orvia the manual implementation from the first example) then the result wouldviolate transitivity:

#[derive(PartialEq)]enumBookFormat {    Paperback,    Hardback,    Ebook,}#[derive(PartialEq)]structBook {    isbn: i32,    format: BookFormat,}implPartialEq<BookFormat>forBook {fneq(&self, other:&BookFormat) -> bool {self.format ==*other    }}implPartialEq<Book>forBookFormat {fneq(&self, other:&Book) -> bool {*self== other.format    }}fnmain() {letb1 = Book { isbn:1, format: BookFormat::Paperback };letb2 = Book { isbn:2, format: BookFormat::Paperback };assert!(b1 == BookFormat::Paperback);assert!(BookFormat::Paperback == b2);// The following should hold by transitivity but doesn't.assert!(b1 == b2);// <-- PANICS}

§Examples

letx: u32 =0;lety: u32 =1;assert_eq!(x == y,false);assert_eq!(x.eq(&y),false);

Required Methods§

1.0.0 ·Source

fneq(&self, other:&Rhs) ->bool

Tests forself andother values to be equal, and is used by==.

Provided Methods§

1.0.0 ·Source

fnne(&self, other:&Rhs) ->bool

Tests for!=. The default implementation is almost always sufficient,and should not be overridden without very good reason.

Implementors§

Source§

implPartialEq forAsciiChar

1.65.0 ·Source§

implPartialEq forBacktraceStatus

Source§

implPartialEq forTryReserveErrorKind

1.34.0 (const:unstable) ·Source§

implPartialEq forInfallible

1.0.0 ·Source§

implPartialEq forVarError

1.64.0 ·Source§

implPartialEq forFromBytesWithNulError

1.28.0 ·Source§

implPartialEq for std::fmt::Alignment

Source§

implPartialEq forDebugAsHex

Source§

implPartialEq forSign

Source§

implPartialEq forAtomicOrdering

Source§

implPartialEq forSimdAlign

1.0.0 ·Source§

implPartialEq forErrorKind

1.0.0 ·Source§

implPartialEq forSeekFrom

1.7.0 ·Source§

implPartialEq forIpAddr

Source§

implPartialEq forIpv6MulticastScope

1.0.0 ·Source§

implPartialEq forShutdown

1.0.0 ·Source§

implPartialEq forSocketAddr

1.0.0 ·Source§

implPartialEq forFpCategory

1.55.0 ·Source§

implPartialEq forIntErrorKind

Source§

implPartialEq forBacktraceStyle

1.86.0 ·Source§

implPartialEq forGetDisjointMutError

Source§

implPartialEq forSearchStep

1.0.0 ·Source§

implPartialEq for std::sync::atomic::Ordering

1.12.0 ·Source§

implPartialEq forRecvTimeoutError

1.0.0 ·Source§

implPartialEq forTryRecvError

1.0.0 (const:unstable) ·Source§

implPartialEq for std::cmp::Ordering

1.0.0 (const:unstable) ·Source§

implPartialEq forbool

1.0.0 (const:unstable) ·Source§

implPartialEq forchar

1.0.0 (const:unstable) ·Source§

implPartialEq forf16

1.0.0 (const:unstable) ·Source§

implPartialEq forf32

1.0.0 (const:unstable) ·Source§

implPartialEq forf64

1.0.0 (const:unstable) ·Source§

implPartialEq forf128

1.0.0 (const:unstable) ·Source§

implPartialEq fori8

1.0.0 (const:unstable) ·Source§

implPartialEq fori16

1.0.0 (const:unstable) ·Source§

implPartialEq fori32

1.0.0 (const:unstable) ·Source§

implPartialEq fori64

1.0.0 (const:unstable) ·Source§

implPartialEq fori128

1.0.0 (const:unstable) ·Source§

implPartialEq forisize

Source§

implPartialEq for!

1.0.0 (const:unstable) ·Source§

implPartialEq forstr

1.0.0 (const:unstable) ·Source§

implPartialEq foru8

1.0.0 (const:unstable) ·Source§

implPartialEq foru16

1.0.0 (const:unstable) ·Source§

implPartialEq foru32

1.0.0 (const:unstable) ·Source§

implPartialEq foru64

1.0.0 (const:unstable) ·Source§

implPartialEq foru128

1.0.0 (const:unstable) ·Source§

implPartialEq for()

1.0.0 (const:unstable) ·Source§

implPartialEq forusize

1.27.0 ·Source§

implPartialEq forCpuidResult

Source§

implPartialEq forAllocError

1.28.0 ·Source§

implPartialEq forLayout

1.50.0 ·Source§

implPartialEq forLayoutError

1.0.0 (const:unstable) ·Source§

implPartialEq forTypeId

Source§

implPartialEq forByteStr

Source§

implPartialEq forByteString

1.34.0 ·Source§

implPartialEq forCharTryFromError

1.9.0 ·Source§

implPartialEq forDecodeUtf16Error

1.20.0 ·Source§

implPartialEq forParseCharError

1.59.0 ·Source§

implPartialEq forTryFromCharError

Source§

implPartialEq forUnorderedKeyError

1.57.0 ·Source§

implPartialEq forTryReserveError

1.64.0 ·Source§

implPartialEq forCStr

1.64.0 ·Source§

implPartialEq forCString

1.69.0 ·Source§

implPartialEq forFromBytesUntilNulError

1.64.0 ·Source§

implPartialEq forFromVecWithNulError

1.64.0 ·Source§

implPartialEq forIntoStringError

1.64.0 ·Source§

implPartialEq forNulError

1.0.0 ·Source§

implPartialEq forOsStr

1.0.0 ·Source§

implPartialEq forOsString

1.0.0 ·Source§

implPartialEq forError

Source§

implPartialEq forFormattingOptions

1.1.0 ·Source§

implPartialEq forFileType

1.0.0 ·Source§

implPartialEq forPermissions

1.33.0 ·Source§

implPartialEq forPhantomPinned

Source§

implPartialEq forAssume

1.0.0 ·Source§

implPartialEq forAddrParseError

1.0.0 ·Source§

implPartialEq forIpv4Addr

1.0.0 ·Source§

implPartialEq forIpv6Addr

1.0.0 ·Source§

implPartialEq forSocketAddrV4

1.0.0 ·Source§

implPartialEq forSocketAddrV6

1.0.0 ·Source§

implPartialEq forParseFloatError

1.0.0 ·Source§

implPartialEq forParseIntError

1.34.0 ·Source§

implPartialEq forTryFromIntError

1.0.0 (const:unstable) ·Source§

implPartialEq forRangeFull

Source§

implPartialEq forUCred

Available onUnix only.
1.63.0 ·Source§

implPartialEq forInvalidHandleError

Available onWindows only.
1.63.0 ·Source§

implPartialEq forNullHandleError

Available onWindows only.
1.10.0 ·Source§

implPartialEq forLocation<'_>

Source§

implPartialEq forNormalizeError

1.0.0 ·Source§

implPartialEq forPath

1.0.0 ·Source§

implPartialEq forPathBuf

1.7.0 ·Source§

implPartialEq forStripPrefixError

1.61.0 ·Source§

implPartialEq forExitCode

1.0.0 ·Source§

implPartialEq forExitStatus

Source§

implPartialEq forExitStatusError

1.0.0 ·Source§

implPartialEq forOutput

Source§

implPartialEq for std::ptr::Alignment

1.0.0 ·Source§

implPartialEq forParseBoolError

1.0.0 ·Source§

implPartialEq forUtf8Error

1.0.0 ·Source§

implPartialEq forFromUtf8Error

1.0.0 ·Source§

implPartialEq forString

1.0.0 ·Source§

implPartialEq forRecvError

1.5.0 ·Source§

implPartialEq forWaitTimeoutResult

1.36.0 ·Source§

implPartialEq forRawWaker

1.36.0 ·Source§

implPartialEq forRawWakerVTable

1.26.0 ·Source§

implPartialEq forAccessError

1.19.0 ·Source§

implPartialEq forThreadId

1.3.0 ·Source§

implPartialEq forDuration

1.8.0 ·Source§

implPartialEq forInstant

1.8.0 ·Source§

implPartialEq forSystemTime

1.66.0 ·Source§

implPartialEq forTryFromFloatSecsError

1.29.0 ·Source§

implPartialEq<&str> forOsString

1.90.0 ·Source§

implPartialEq<&CStr> forCow<'_,CStr>

1.90.0 ·Source§

implPartialEq<&CStr> forCStr

1.90.0 ·Source§

implPartialEq<&CStr> forCString

1.90.0 ·Source§

implPartialEq<Cow<'_,CStr>> forCStr

1.90.0 ·Source§

implPartialEq<Cow<'_,CStr>> forCString

1.16.0 ·Source§

implPartialEq<IpAddr> forIpv4Addr

1.16.0 ·Source§

implPartialEq<IpAddr> forIpv6Addr

1.0.0 ·Source§

implPartialEq<str> forOsStr

1.0.0 ·Source§

implPartialEq<str> forOsString

1.91.0 ·Source§

implPartialEq<str> forPath

1.91.0 ·Source§

implPartialEq<str> forPathBuf

1.90.0 ·Source§

implPartialEq<CStr> forCow<'_,CStr>

1.90.0 ·Source§

implPartialEq<CStr> forCString

1.90.0 ·Source§

implPartialEq<CString> forCow<'_,CStr>

1.90.0 ·Source§

implPartialEq<CString> forCStr

1.0.0 ·Source§

implPartialEq<OsStr> forstr

1.8.0 ·Source§

implPartialEq<OsStr> forPath

1.8.0 ·Source§

implPartialEq<OsStr> forPathBuf

1.0.0 ·Source§

implPartialEq<OsString> forstr

1.8.0 ·Source§

implPartialEq<OsString> forPath

1.8.0 ·Source§

implPartialEq<OsString> forPathBuf

1.16.0 ·Source§

implPartialEq<Ipv4Addr> forIpAddr

1.16.0 ·Source§

implPartialEq<Ipv6Addr> forIpAddr

1.91.0 ·Source§

implPartialEq<Path> forstr

1.8.0 ·Source§

implPartialEq<Path> forOsStr

1.8.0 ·Source§

implPartialEq<Path> forOsString

1.6.0 ·Source§

implPartialEq<Path> forPathBuf

1.91.0 ·Source§

implPartialEq<Path> forString

1.91.0 ·Source§

implPartialEq<PathBuf> forstr

1.8.0 ·Source§

implPartialEq<PathBuf> forOsStr

1.8.0 ·Source§

implPartialEq<PathBuf> forOsString

1.6.0 ·Source§

implPartialEq<PathBuf> forPath

1.91.0 ·Source§

implPartialEq<PathBuf> forString

1.91.0 ·Source§

implPartialEq<String> forPath

1.91.0 ·Source§

implPartialEq<String> forPathBuf

1.0.0 ·Source§

impl<'a>PartialEq forComponent<'a>

1.0.0 ·Source§

impl<'a>PartialEq forPrefix<'a>

Source§

impl<'a>PartialEq forUtf8Pattern<'a>

Source§

impl<'a>PartialEq forPhantomContravariantLifetime<'a>

Source§

impl<'a>PartialEq forPhantomCovariantLifetime<'a>

Source§

impl<'a>PartialEq forPhantomInvariantLifetime<'a>

1.0.0 ·Source§

impl<'a>PartialEq forComponents<'a>

1.0.0 ·Source§

impl<'a>PartialEq forPrefixComponent<'a>

1.79.0 ·Source§

impl<'a>PartialEq forUtf8Chunk<'a>

Source§

impl<'a>PartialEq<&'aByteStr> forCow<'a,str>

Source§

impl<'a>PartialEq<&'aByteStr> forCow<'a,ByteStr>

Source§

impl<'a>PartialEq<&'aByteStr> forCow<'a, [u8]>

1.8.0 ·Source§

impl<'a>PartialEq<&'aOsStr> forPath

1.8.0 ·Source§

impl<'a>PartialEq<&'aOsStr> forPathBuf

1.8.0 ·Source§

impl<'a>PartialEq<&'aPath> forOsStr

1.8.0 ·Source§

impl<'a>PartialEq<&'aPath> forOsString

1.6.0 ·Source§

impl<'a>PartialEq<&'aPath> forPathBuf

Source§

impl<'a>PartialEq<&str> forByteStr

Source§

impl<'a>PartialEq<&str> forByteString

Source§

impl<'a>PartialEq<&ByteStr> forByteString

Source§

impl<'a>PartialEq<&[u8]> forByteStr

Source§

impl<'a>PartialEq<&[u8]> forByteString

Source§

impl<'a>PartialEq<Cow<'_,str>> forByteString

Source§

impl<'a>PartialEq<Cow<'_,ByteStr>> forByteString

Source§

impl<'a>PartialEq<Cow<'_, [u8]>> forByteString

Source§

impl<'a>PartialEq<Cow<'a,str>> for &'aByteStr

Source§

impl<'a>PartialEq<Cow<'a,ByteStr>> for &'aByteStr

1.8.0 ·Source§

impl<'a>PartialEq<Cow<'a,OsStr>> forPath

1.8.0 ·Source§

impl<'a>PartialEq<Cow<'a,OsStr>> forPathBuf

1.8.0 ·Source§

impl<'a>PartialEq<Cow<'a,Path>> forOsStr

1.8.0 ·Source§

impl<'a>PartialEq<Cow<'a,Path>> forOsString

1.6.0 ·Source§

impl<'a>PartialEq<Cow<'a,Path>> forPath

1.6.0 ·Source§

impl<'a>PartialEq<Cow<'a,Path>> forPathBuf

Source§

impl<'a>PartialEq<Cow<'a, [u8]>> for &'aByteStr

Source§

impl<'a>PartialEq<str> forByteStr

Source§

impl<'a>PartialEq<str> forByteString

Source§

impl<'a>PartialEq<ByteStr> for &str

Source§

impl<'a>PartialEq<ByteStr> for &[u8]

Source§

impl<'a>PartialEq<ByteStr> forstr

Source§

impl<'a>PartialEq<ByteStr> forByteString

Source§

impl<'a>PartialEq<ByteStr> forString

Source§

impl<'a>PartialEq<ByteStr> forVec<u8>

Source§

impl<'a>PartialEq<ByteStr> for [u8]

Source§

impl<'a>PartialEq<ByteString> for &str

Source§

impl<'a>PartialEq<ByteString> for &ByteStr

Source§

impl<'a>PartialEq<ByteString> for &[u8]

Source§

impl<'a>PartialEq<ByteString> forCow<'_,str>

Source§

impl<'a>PartialEq<ByteString> forCow<'_,ByteStr>

Source§

impl<'a>PartialEq<ByteString> forCow<'_, [u8]>

Source§

impl<'a>PartialEq<ByteString> forstr

Source§

impl<'a>PartialEq<ByteString> forByteStr

Source§

impl<'a>PartialEq<ByteString> forString

Source§

impl<'a>PartialEq<ByteString> forVec<u8>

Source§

impl<'a>PartialEq<ByteString> for [u8]

1.8.0 ·Source§

impl<'a>PartialEq<OsStr> for &'aPath

1.8.0 ·Source§

impl<'a>PartialEq<OsStr> forCow<'a,Path>

1.29.0 ·Source§

impl<'a>PartialEq<OsString> for &'astr

1.8.0 ·Source§

impl<'a>PartialEq<OsString> for &'aPath

1.8.0 ·Source§

impl<'a>PartialEq<OsString> forCow<'a,Path>

1.8.0 ·Source§

impl<'a>PartialEq<Path> for &'aOsStr

1.8.0 ·Source§

impl<'a>PartialEq<Path> forCow<'a,OsStr>

1.6.0 ·Source§

impl<'a>PartialEq<Path> forCow<'a,Path>

1.8.0 ·Source§

impl<'a>PartialEq<PathBuf> for &'aOsStr

1.6.0 ·Source§

impl<'a>PartialEq<PathBuf> for &'aPath

1.8.0 ·Source§

impl<'a>PartialEq<PathBuf> forCow<'a,OsStr>

1.6.0 ·Source§

impl<'a>PartialEq<PathBuf> forCow<'a,Path>

Source§

impl<'a>PartialEq<String> forByteStr

Source§

impl<'a>PartialEq<String> forByteString

Source§

impl<'a>PartialEq<Vec<u8>> forByteStr

Source§

impl<'a>PartialEq<Vec<u8>> forByteString

Source§

impl<'a>PartialEq<[u8]> forByteStr

Source§

impl<'a>PartialEq<[u8]> forByteString

1.0.0 ·Source§

impl<'a, 'b>PartialEq<&'astr> forString

1.8.0 ·Source§

impl<'a, 'b>PartialEq<&'aOsStr> forOsString

1.8.0 ·Source§

impl<'a, 'b>PartialEq<&'aPath> forCow<'b,OsStr>

1.0.0 ·Source§

impl<'a, 'b>PartialEq<&'bstr> forCow<'a,str>

1.8.0 ·Source§

impl<'a, 'b>PartialEq<&'bOsStr> forCow<'a,OsStr>

1.8.0 ·Source§

impl<'a, 'b>PartialEq<&'bOsStr> forCow<'a,Path>

1.6.0 ·Source§

impl<'a, 'b>PartialEq<&'bPath> forCow<'a,Path>

1.0.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,str>> for &'bstr

1.0.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,str>> forstr

1.0.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,str>> forString

1.8.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,OsStr>> for &'bOsStr

1.8.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,OsStr>> forOsStr

1.8.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,OsStr>> forOsString

1.8.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,Path>> for &'bOsStr

1.6.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'a,Path>> for &'bPath

1.8.0 ·Source§

impl<'a, 'b>PartialEq<Cow<'b,OsStr>> for &'aPath

1.0.0 ·Source§

impl<'a, 'b>PartialEq<str> forCow<'a,str>

1.0.0 ·Source§

impl<'a, 'b>PartialEq<str> forString

1.8.0 ·Source§

impl<'a, 'b>PartialEq<OsStr> forCow<'a,OsStr>

1.8.0 ·Source§

impl<'a, 'b>PartialEq<OsStr> forOsString

1.8.0 ·Source§

impl<'a, 'b>PartialEq<OsString> for &'aOsStr

1.8.0 ·Source§

impl<'a, 'b>PartialEq<OsString> forCow<'a,OsStr>

1.8.0 ·Source§

impl<'a, 'b>PartialEq<OsString> forOsStr

1.0.0 ·Source§

impl<'a, 'b>PartialEq<String> for &'astr

1.0.0 ·Source§

impl<'a, 'b>PartialEq<String> forCow<'a,str>

1.0.0 ·Source§

impl<'a, 'b>PartialEq<String> forstr

1.0.0 ·Source§

impl<'a, 'b, B, C>PartialEq<Cow<'b, C>> forCow<'a, B>
where B:PartialEq<C> +ToOwned + ?Sized, C:ToOwned + ?Sized,

1.0.0 (const:unstable) ·Source§

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

1.0.0 (const:unstable) ·Source§

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

1.0.0 (const:unstable) ·Source§

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

1.0.0 (const:unstable) ·Source§

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

1.55.0 (const:unstable) ·Source§

impl<B, C>PartialEq forControlFlow<B, C>
where B:PartialEq, C:PartialEq,

Source§

impl<Dyn>PartialEq forDynMetadata<Dyn>
where Dyn: ?Sized,

1.4.0 ·Source§

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

1.29.0 ·Source§

impl<H>PartialEq forBuildHasherDefault<H>

1.0.0 (const:unstable) ·Source§

impl<Idx>PartialEq for std::ops::Range<Idx>
where Idx:PartialEq,

1.0.0 (const:unstable) ·Source§

impl<Idx>PartialEq for std::ops::RangeFrom<Idx>
where Idx:PartialEq,

1.26.0 (const:unstable) ·Source§

impl<Idx>PartialEq for std::ops::RangeInclusive<Idx>
where Idx:PartialEq,

1.0.0 (const:unstable) ·Source§

impl<Idx>PartialEq forRangeTo<Idx>
where Idx:PartialEq,

1.26.0 ·Source§

impl<Idx>PartialEq for std::ops::RangeToInclusive<Idx>
where Idx:PartialEq,

Source§

impl<Idx>PartialEq for std::range::Range<Idx>
where Idx:PartialEq,

Source§

impl<Idx>PartialEq for std::range::RangeFrom<Idx>
where Idx:PartialEq,

Source§

impl<Idx>PartialEq for std::range::RangeInclusive<Idx>
where Idx:PartialEq,

Source§

impl<Idx>PartialEq for std::range::RangeToInclusive<Idx>
where Idx:PartialEq,

1.0.0 ·Source§

impl<K, V, A>PartialEq forBTreeMap<K, V, A>

1.0.0 ·Source§

impl<K, V, S>PartialEq forHashMap<K, V, S>
where K:Eq +Hash, V:PartialEq, S:BuildHasher,

1.41.0 ·Source§

impl<Ptr, Q>PartialEq<Pin<Q>> forPin<Ptr>
where Ptr:Deref, Q:Deref, <Ptr asDeref>::Target:PartialEq<<Q asDeref>::Target>,

1.17.0 (const:unstable) ·Source§

impl<T>PartialEq forBound<T>
where T:PartialEq,

1.0.0 (const:unstable) ·Source§

impl<T>PartialEq forOption<T>
where T:PartialEq,

1.36.0 ·Source§

impl<T>PartialEq forPoll<T>
where T:PartialEq,

1.0.0 ·Source§

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

Pointer equality is by address, as produced by the<*const T>::addr method.

1.0.0 ·Source§

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

Pointer equality is by address, as produced by the<*mut T>::addr method.

1.0.0 (const:unstable) ·Source§

impl<T>PartialEq for(T₁, T₂, …, Tₙ)
where T:PartialEq,

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

1.0.0 ·Source§

impl<T>PartialEq forCell<T>
where T:PartialEq +Copy,

1.70.0 ·Source§

impl<T>PartialEq forOnceCell<T>
where T:PartialEq,

1.0.0 ·Source§

impl<T>PartialEq forRefCell<T>
where T:PartialEq + ?Sized,

Source§

impl<T>PartialEq forPhantomContravariant<T>
where T: ?Sized,

Source§

impl<T>PartialEq forPhantomCovariant<T>
where T: ?Sized,

1.0.0 ·Source§

impl<T>PartialEq forPhantomData<T>
where T: ?Sized,

Source§

impl<T>PartialEq forPhantomInvariant<T>
where T: ?Sized,

1.21.0 ·Source§

impl<T>PartialEq forDiscriminant<T>

1.20.0 ·Source§

impl<T>PartialEq forManuallyDrop<T>
where T:PartialEq + ?Sized,

1.28.0 (const:unstable) ·Source§

impl<T>PartialEq forNonZero<T>

1.74.0 ·Source§

impl<T>PartialEq forSaturating<T>
where T:PartialEq,

1.0.0 ·Source§

impl<T>PartialEq forWrapping<T>
where T:PartialEq,

1.25.0 ·Source§

impl<T>PartialEq forNonNull<T>
where T: ?Sized,

1.19.0 (const:unstable) ·Source§

impl<T>PartialEq forReverse<T>
where T:PartialEq,

1.0.0 ·Source§

impl<T, A>PartialEq forBox<T, A>
where T:PartialEq + ?Sized, A:Allocator,

1.0.0 ·Source§

impl<T, A>PartialEq forBTreeSet<T, A>

1.0.0 ·Source§

impl<T, A>PartialEq forLinkedList<T, A>
where T:PartialEq, A:Allocator,

1.0.0 ·Source§

impl<T, A>PartialEq forVecDeque<T, A>
where T:PartialEq, A:Allocator,

1.0.0 ·Source§

impl<T, A>PartialEq forRc<T, A>
where T:PartialEq + ?Sized, A:Allocator,

Source§

impl<T, A>PartialEq forUniqueRc<T, A>
where T:PartialEq + ?Sized, A:Allocator,

1.0.0 ·Source§

impl<T, A>PartialEq forArc<T, A>
where T:PartialEq + ?Sized, A:Allocator,

Source§

impl<T, A>PartialEq forUniqueArc<T, A>
where T:PartialEq + ?Sized, A:Allocator,

1.0.0 (const:unstable) ·Source§

impl<T, E>PartialEq forResult<T, E>
where T:PartialEq, E:PartialEq,

1.0.0 ·Source§

impl<T, S>PartialEq forHashSet<T, S>
where T:Eq +Hash, S:BuildHasher,

1.0.0 ·Source§

impl<T, U>PartialEq<&[U]> forCow<'_,[T]>
where T:PartialEq<U> +Clone,

1.0.0 ·Source§

impl<T, U>PartialEq<&mut[U]> forCow<'_,[T]>
where T:PartialEq<U> +Clone,

1.0.0 (const:unstable) ·Source§

impl<T, U>PartialEq<[U]> for[T]
where T:PartialEq<U>,

Source§

impl<T, U>PartialEq<Exclusive<U>> forExclusive<T>
where T:Sync +PartialEq<U> + ?Sized, U:Sync + ?Sized,

1.0.0 ·Source§

impl<T, U, A1, A2>PartialEq<Vec<U, A2>> forVec<T, A1>
where A1:Allocator, A2:Allocator, T:PartialEq<U>,

1.17.0 ·Source§

impl<T, U, A>PartialEq<&[U]> forVecDeque<T, A>
where A:Allocator, T:PartialEq<U>,

1.0.0 ·Source§

impl<T, U, A>PartialEq<&[U]> forVec<T, A>
where A:Allocator, T:PartialEq<U>,

1.17.0 ·Source§

impl<T, U, A>PartialEq<&mut[U]> forVecDeque<T, A>
where A:Allocator, T:PartialEq<U>,

1.0.0 ·Source§

impl<T, U, A>PartialEq<&mut[U]> forVec<T, A>
where A:Allocator, T:PartialEq<U>,

1.48.0 ·Source§

impl<T, U, A>PartialEq<[U]> forVec<T, A>
where A:Allocator, T:PartialEq<U>,

1.46.0 ·Source§

impl<T, U, A>PartialEq<Vec<U, A>> for &[T]
where A:Allocator, T:PartialEq<U>,

1.46.0 ·Source§

impl<T, U, A>PartialEq<Vec<U, A>> for &mut[T]
where A:Allocator, T:PartialEq<U>,

1.0.0 ·Source§

impl<T, U, A>PartialEq<Vec<U, A>> forCow<'_,[T]>
where A:Allocator, T:PartialEq<U> +Clone,

1.48.0 ·Source§

impl<T, U, A>PartialEq<Vec<U, A>> for[T]
where A:Allocator, T:PartialEq<U>,

1.17.0 ·Source§

impl<T, U, A>PartialEq<Vec<U, A>> forVecDeque<T, A>
where A:Allocator, T:PartialEq<U>,

1.17.0 ·Source§

impl<T, U, A, const N:usize>PartialEq<&[U; N]> forVecDeque<T, A>
where A:Allocator, T:PartialEq<U>,

1.0.0 ·Source§

impl<T, U, A, const N:usize>PartialEq<&[U; N]> forVec<T, A>
where A:Allocator, T:PartialEq<U>,

1.17.0 ·Source§

impl<T, U, A, const N:usize>PartialEq<&mut[U; N]> forVecDeque<T, A>
where A:Allocator, T:PartialEq<U>,

1.17.0 ·Source§

impl<T, U, A, const N:usize>PartialEq<[U; N]> forVecDeque<T, A>
where A:Allocator, T:PartialEq<U>,

1.0.0 ·Source§

impl<T, U, A, const N:usize>PartialEq<[U; N]> forVec<T, A>
where A:Allocator, T:PartialEq<U>,

1.0.0 (const:unstable) ·Source§

impl<T, U, const N:usize>PartialEq<&[U]> for[T; N]
where T:PartialEq<U>,

1.0.0 (const:unstable) ·Source§

impl<T, U, const N:usize>PartialEq<&mut[U]> for[T; N]
where T:PartialEq<U>,

1.0.0 (const:unstable) ·Source§

impl<T, U, const N:usize>PartialEq<[U; N]> for &[T]
where T:PartialEq<U>,

1.0.0 (const:unstable) ·Source§

impl<T, U, const N:usize>PartialEq<[U; N]> for &mut[T]
where T:PartialEq<U>,

1.0.0 (const:unstable) ·Source§

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

1.0.0 (const:unstable) ·Source§

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

1.0.0 (const:unstable) ·Source§

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

Source§

impl<T, const N:usize>PartialEq forMask<T, N>

Source§

impl<T, const N:usize>PartialEq forSimd<T, N>

Source§

impl<T:PartialEq>PartialEq forSendTimeoutError<T>

1.0.0 ·Source§

impl<T:PartialEq>PartialEq forTrySendError<T>

1.0.0 ·Source§

impl<T:PartialEq>PartialEq forCursor<T>

1.0.0 ·Source§

impl<T:PartialEq>PartialEq forSendError<T>

1.70.0 ·Source§

impl<T:PartialEq>PartialEq forOnceLock<T>

Source§

impl<Y, R>PartialEq forCoroutineState<Y, R>
where Y:PartialEq, R:PartialEq,

Source§

impl<const N:usize>PartialEq<&[u8;N]> forByteStr

Source§

impl<const N:usize>PartialEq<&[u8;N]> forByteString

Source§

impl<const N:usize>PartialEq<ByteStr> for &[u8;N]

Source§

impl<const N:usize>PartialEq<ByteStr> for [u8;N]

Source§

impl<const N:usize>PartialEq<ByteString> for &[u8;N]

Source§

impl<const N:usize>PartialEq<ByteString> for [u8;N]

Source§

impl<const N:usize>PartialEq<[u8;N]> forByteStr

Source§

impl<const N:usize>PartialEq<[u8;N]> forByteString


[8]ページ先頭

©2009-2026 Movatter.jp