Struct object_safe::Obj
source · 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: TImplementations§
Trait Implementations§
source§impl<T: Deref<Target = X>, X: PartialEqObj + ?Sized> PartialEq<Obj<T>> for Obj<T>where
Obj<T>: 'static,
impl<T: Deref<Target = X>, X: PartialEqObj + ?Sized> PartialEq<Obj<T>> 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> 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