Struct by_address::ByAddress
source · [−]Expand description
Wrapper for pointer types that implements by-address comparison.
See the crate-level documentation for details.
Note that equality tests and hashes on fat pointers (&dyn Trait
, &[T]
, &str
, etc)
include the attribute of the fat pointer. If this is not desired, use ByThinAddress
.
Tuple Fields
0: T
Trait Implementations
sourceimpl<T> PartialEq<ByAddress<T>> for ByAddress<T>where
T: ?Sized + Deref,
impl<T> PartialEq<ByAddress<T>> for ByAddress<T>where
T: ?Sized + Deref,
Raw pointer equality
sourceimpl<T> PartialOrd<ByAddress<T>> for ByAddress<T>where
T: ?Sized + Deref,
impl<T> PartialOrd<ByAddress<T>> for ByAddress<T>where
T: ?Sized + Deref,
Raw pointer comparison
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn 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 ByAddress<T>where
T: ?Sized + Deref,
impl<T> Eq for ByAddress<T>where
T: ?Sized + Deref,
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for ByAddress<T>where
T: RefUnwindSafe,
impl<T: ?Sized> Send for ByAddress<T>where
T: Send,
impl<T: ?Sized> Sync for ByAddress<T>where
T: Sync,
impl<T: ?Sized> Unpin for ByAddress<T>where
T: Unpin,
impl<T: ?Sized> UnwindSafe for ByAddress<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more