Struct phantom_type::PhantomType
source · pub struct PhantomType<T: ?Sized>(/* private fields */);
Expand description
A PhantomData
analog which prevents “parameter is never used” error,
but does not produce any restrictions in contrast with PhantomData
.
Implementations§
Trait Implementations§
source§impl<T: ?Sized> Clone for PhantomType<T>
impl<T: ?Sized> Clone for PhantomType<T>
source§impl<T: ?Sized> Debug for PhantomType<T>
impl<T: ?Sized> Debug for PhantomType<T>
source§impl<T: ?Sized> Default for PhantomType<T>
impl<T: ?Sized> Default for PhantomType<T>
source§impl<T: ?Sized> Hash for PhantomType<T>
impl<T: ?Sized> Hash for PhantomType<T>
source§impl<T: ?Sized> Ord for PhantomType<T>
impl<T: ?Sized> Ord for PhantomType<T>
source§impl<T: ?Sized> PartialEq for PhantomType<T>
impl<T: ?Sized> PartialEq for PhantomType<T>
source§impl<T: ?Sized> PartialOrd for PhantomType<T>
impl<T: ?Sized> PartialOrd for PhantomType<T>
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: ?Sized> Copy for PhantomType<T>
impl<T: ?Sized> Eq for PhantomType<T>
impl<T: ?Sized> RefUnwindSafe for PhantomType<T>
impl<T: ?Sized> Send for PhantomType<T>
impl<T: ?Sized> Sync for PhantomType<T>
impl<T: ?Sized> Unpin for PhantomType<T>
impl<T: ?Sized> UnwindSafe for PhantomType<T>
Auto Trait Implementations§
impl<T: ?Sized> Freeze for PhantomType<T>
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