Struct spirt::OrdAssertEq
source · pub struct OrdAssertEq<T>(pub T);
Expand description
Wrapper to limit Ord
for interned index types (e.g. InternedStr
)
to only situations where the interned index reflects contents (i.e. equality).
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Clone> Clone for OrdAssertEq<T>
impl<T: Clone> Clone for OrdAssertEq<T>
source§fn clone(&self) -> OrdAssertEq<T>
fn clone(&self) -> OrdAssertEq<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Hash> Hash for OrdAssertEq<T>
impl<T: Hash> Hash for OrdAssertEq<T>
source§impl<T: Eq> Ord for OrdAssertEq<T>
impl<T: Eq> Ord for OrdAssertEq<T>
source§impl<T: PartialEq> PartialEq<OrdAssertEq<T>> for OrdAssertEq<T>
impl<T: PartialEq> PartialEq<OrdAssertEq<T>> for OrdAssertEq<T>
source§fn eq(&self, other: &OrdAssertEq<T>) -> bool
fn eq(&self, other: &OrdAssertEq<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: Eq> PartialOrd<OrdAssertEq<T>> for OrdAssertEq<T>
impl<T: Eq> PartialOrd<OrdAssertEq<T>> for OrdAssertEq<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for OrdAssertEq<T>
impl<T: Eq> Eq for OrdAssertEq<T>
impl<T> StructuralEq for OrdAssertEq<T>
impl<T> StructuralPartialEq for OrdAssertEq<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for OrdAssertEq<T>where T: RefUnwindSafe,
impl<T> Send for OrdAssertEq<T>where T: Send,
impl<T> Sync for OrdAssertEq<T>where T: Sync,
impl<T> Unpin for OrdAssertEq<T>where T: Unpin,
impl<T> UnwindSafe for OrdAssertEq<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.