pub enum MaybeRef<T> {
Ref(ObjRef),
NotRef(T),
}
Expand description
A struct that is either an object or a reference to an object.
Variants§
Trait Implementations§
impl<T: Eq> Eq for MaybeRef<T>
impl<T> StructuralPartialEq for MaybeRef<T>
Auto Trait Implementations§
impl<T> Freeze for MaybeRef<T>where
T: Freeze,
impl<T> RefUnwindSafe for MaybeRef<T>where
T: RefUnwindSafe,
impl<T> Send for MaybeRef<T>where
T: Send,
impl<T> Sync for MaybeRef<T>where
T: Sync,
impl<T> Unpin for MaybeRef<T>where
T: Unpin,
impl<T> UnwindSafe for MaybeRef<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