pub enum RefOrVal<'a, T> {
Ref(&'a T),
Val(T),
}
Expand description
Represent a reference to T or a direct T
Variants
Ref(&'a T)
Val(T)
Implementations
Trait Implementations
impl<'a, T: Eq> Eq for RefOrVal<'a, T>
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for RefOrVal<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for RefOrVal<'a, T> where
T: Send + Sync,
impl<'a, T> Sync for RefOrVal<'a, T> where
T: Sync,
impl<'a, T> Unpin for RefOrVal<'a, T> where
T: Unpin,
impl<'a, T> UnwindSafe for RefOrVal<'a, T> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more