Struct by_address::ByThinAddress
source · #[repr(transparent)]pub struct ByThinAddress<T>(pub T)
where
T: ?Sized + Deref;
Expand description
Similar to ByAddress
, but omits the attributes of fat pointers.
This means that two slices with the same starting element but different lengths will be considered equal.
Two trait objects with the same data pointer but different vtables will also be considered
equal. (In particular, this may happen for traits that are implemented on zero-sized types,
including Fn
and other closure traits.)
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
source§impl<T, U> AsRef<U> for ByThinAddress<T>
impl<T, U> AsRef<U> for ByThinAddress<T>
source§impl<T> Clone for ByThinAddress<T>
impl<T> Clone for ByThinAddress<T>
source§fn clone(&self) -> ByThinAddress<T>
fn clone(&self) -> ByThinAddress<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> Debug for ByThinAddress<T>
impl<T> Debug for ByThinAddress<T>
source§impl<T> Default for ByThinAddress<T>
impl<T> Default for ByThinAddress<T>
source§fn default() -> ByThinAddress<T>
fn default() -> ByThinAddress<T>
Returns the “default value” for a type. Read more
source§impl<T> Deref for ByThinAddress<T>
impl<T> Deref for ByThinAddress<T>
source§impl<T> DerefMut for ByThinAddress<T>
impl<T> DerefMut for ByThinAddress<T>
source§impl<T> Display for ByThinAddress<T>
impl<T> Display for ByThinAddress<T>
source§impl<T> Hash for ByThinAddress<T>
impl<T> Hash for ByThinAddress<T>
Raw pointer hashing
source§impl<T> Ord for ByThinAddress<T>
impl<T> Ord for ByThinAddress<T>
Raw pointer ordering
source§impl<T> PartialEq for ByThinAddress<T>
impl<T> PartialEq for ByThinAddress<T>
Raw pointer equality
source§impl<T> PartialOrd for ByThinAddress<T>
impl<T> PartialOrd for ByThinAddress<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 ByThinAddress<T>
impl<T> Eq for ByThinAddress<T>
Auto Trait Implementations§
impl<T: ?Sized> Freeze for ByThinAddress<T>where
T: Freeze,
impl<T: ?Sized> RefUnwindSafe for ByThinAddress<T>where
T: RefUnwindSafe,
impl<T: ?Sized> Send for ByThinAddress<T>where
T: Send,
impl<T: ?Sized> Sync for ByThinAddress<T>where
T: Sync,
impl<T: ?Sized> Unpin for ByThinAddress<T>where
T: Unpin,
impl<T: ?Sized> UnwindSafe for ByThinAddress<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