pub enum MaybeOwnedMut<'a, T> {
Owned(T),
Borrowed(&'a mut T),
}
Expand description
A type that’s either owned or mutably borrowed .
Variants§
Trait Implementations§
Source§impl<T> Deref for MaybeOwnedMut<'_, T>
impl<T> Deref for MaybeOwnedMut<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for MaybeOwnedMut<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for MaybeOwnedMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for MaybeOwnedMut<'a, T>where
T: Send,
impl<'a, T> Sync for MaybeOwnedMut<'a, T>where
T: Sync,
impl<'a, T> Unpin for MaybeOwnedMut<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for MaybeOwnedMut<'a, 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