pub struct ByAddress<T>(pub T)
where
T: Deref + ?Sized;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: TTrait Implementations§
source§impl<T> PartialEq for ByAddress<T>
impl<T> PartialEq for ByAddress<T>
Raw pointer equality
source§impl<T> PartialOrd for ByAddress<T>
impl<T> PartialOrd for ByAddress<T>
Raw pointer comparison
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 for ByAddress<T>
impl<T> Eq for ByAddress<T>
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§
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