#[repr(transparent)]pub struct Spez<T: ?Sized>(pub T);Expand description
A wrapper type used for auto-deref specialization.
This struct is a core part of the auto-deref-based specialization technique which allows
conditionally implementing functionality based on what traits a type implements, without
requiring the unstable specialization feature.
It wraps a value and is used in conjunction with trait implementations that leverage Rust’s method resolution rules to select different implementations based on available traits.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: ?Sized> SpezCloneIntoNo for Spez<T>
impl<T: ?Sized> SpezCloneIntoNo for Spez<T>
Source§impl<T: ?Sized> SpezDebugNo for Spez<T>
impl<T: ?Sized> SpezDebugNo for Spez<T>
Source§impl<T: ?Sized> SpezDisplayNo for Spez<T>
impl<T: ?Sized> SpezDisplayNo for Spez<T>
Source§impl<T: ?Sized> SpezHashNo for Spez<T>
impl<T: ?Sized> SpezHashNo for Spez<T>
Source§impl<T: ?Sized> SpezPartialEqNo for Spez<T>
impl<T: ?Sized> SpezPartialEqNo for Spez<T>
Source§fn spez_partial_eq(&self, _other: &Self) -> bool
fn spez_partial_eq(&self, _other: &Self) -> bool
Fallback implementation when the type doesn’t implement
PartialEq. Read moreSource§impl<T: ?Sized + PartialEq> SpezPartialEqYes for &Spez<T>
impl<T: ?Sized + PartialEq> SpezPartialEqYes for &Spez<T>
Source§fn spez_partial_eq(&self, other: &Self) -> bool
fn spez_partial_eq(&self, other: &Self) -> bool
Checks if two values are equal. Read more
Source§impl<T: ?Sized> SpezPartialOrdNo for Spez<T>
impl<T: ?Sized> SpezPartialOrdNo for Spez<T>
Source§impl<T: ?Sized + PartialOrd> SpezPartialOrdYes for &Spez<T>
impl<T: ?Sized + PartialOrd> SpezPartialOrdYes for &Spez<T>
Auto Trait Implementations§
impl<T> Freeze for Spez<T>
impl<T> RefUnwindSafe for Spez<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Spez<T>
impl<T> Sync for Spez<T>
impl<T> Unpin for Spez<T>
impl<T> UnwindSafe for Spez<T>where
T: UnwindSafe + ?Sized,
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