#[repr(transparent)]pub struct Stripped<T: ?Sized>(pub T);Expand description
Wrapper to consider values without metadata.
This wrapper can be used in combination with the Stripped* traits such
as StrippedPartialEq to access and compare values ignoring code mapping
metadata.
An owned value can directly be wrapped.
Any reference &T can be safely converted into &Stripped<T> using the
BorrowStripped::stripped method.
Tuple Fields
0: TImplementations
Trait Implementations
sourceimpl<T> BorrowMut<T> for Stripped<T>
impl<T> BorrowMut<T> for Stripped<T>
sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T: StrippedHash> Hash for Stripped<T>
impl<T: StrippedHash> Hash for Stripped<T>
sourceimpl<T: StrippedOrd> Ord for Stripped<T>
impl<T: StrippedOrd> Ord for Stripped<T>
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: StrippedPartialEq<U>, U> PartialEq<Stripped<U>> for Stripped<T>
impl<T: StrippedPartialEq<U>, U> PartialEq<Stripped<U>> for Stripped<T>
sourceimpl<T: StrippedPartialOrd<U>, U> PartialOrd<Stripped<U>> for Stripped<T>
impl<T: StrippedPartialOrd<U>, U> PartialOrd<Stripped<U>> for Stripped<T>
sourcefn partial_cmp(&self, other: &Stripped<U>) -> Option<Ordering>
fn partial_cmp(&self, other: &Stripped<U>) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl<T: StrippedHash> StrippedHash for Stripped<T>
impl<T: StrippedHash> StrippedHash for Stripped<T>
fn stripped_hash<H: Hasher>(&self, state: &mut H)
sourceimpl<T: StrippedOrd> StrippedOrd for Stripped<T>
impl<T: StrippedOrd> StrippedOrd for Stripped<T>
fn stripped_cmp(&self, other: &Self) -> Ordering
sourceimpl<T: StrippedPartialEq<U>, U> StrippedPartialEq<Stripped<U>> for Stripped<T>
impl<T: StrippedPartialEq<U>, U> StrippedPartialEq<Stripped<U>> for Stripped<T>
fn stripped_eq(&self, other: &Stripped<U>) -> bool
sourceimpl<T: StrippedPartialOrd<U>, U> StrippedPartialOrd<Stripped<U>> for Stripped<T>
impl<T: StrippedPartialOrd<U>, U> StrippedPartialOrd<Stripped<U>> for Stripped<T>
fn stripped_partial_cmp(&self, other: &Stripped<U>) -> Option<Ordering>
impl<T: Copy + ?Sized> Copy for Stripped<T>
impl<T: StrippedEq> Eq for Stripped<T>
impl<T: StrippedEq> StrippedEq for Stripped<T>
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for Stripped<T>where
T: RefUnwindSafe,
impl<T: ?Sized> Send for Stripped<T>where
T: Send,
impl<T: ?Sized> Sync for Stripped<T>where
T: Sync,
impl<T: ?Sized> Unpin for Stripped<T>where
T: Unpin,
impl<T: ?Sized> UnwindSafe for Stripped<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