pub struct Obj<T>(pub T);
Expand description
Convenient wrapper struct that implements any of the traits supported by
this crate if the contained type derefs to something implementing the
**Obj
analog trait.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
Source§impl<T: Deref<Target = X>, X: PartialEqObj + ?Sized> PartialEq for Obj<T>where
Obj<T>: 'static,
impl<T: Deref<Target = X>, X: PartialEqObj + ?Sized> PartialEq for Obj<T>where
Obj<T>: 'static,
impl<T: Copy> Copy for Obj<T>
impl<T: Deref<Target = X>, X: EqObj + ?Sized> Eq for Obj<T>where
Obj<T>: 'static,
Auto Trait Implementations§
impl<T> Freeze for Obj<T>where
T: Freeze,
impl<T> RefUnwindSafe for Obj<T>where
T: RefUnwindSafe,
impl<T> Send for Obj<T>where
T: Send,
impl<T> Sync for Obj<T>where
T: Sync,
impl<T> Unpin for Obj<T>where
T: Unpin,
impl<T> UnwindSafe for Obj<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