pub enum MuCow<'a, B>{
Borrowed(&'a mut B),
Owned(<B as ToOwned>::Owned),
}Expand description
A clone-on-consume smart pointer.
Variants§
Implementations§
Trait Implementations§
Source§impl<'a, B> BorrowMut<B> for MuCow<'a, B>
impl<'a, B> BorrowMut<B> for MuCow<'a, B>
Source§fn borrow_mut(&mut self) -> &mut B
fn borrow_mut(&mut self) -> &mut B
Mutably borrows from an owned value. Read more
Source§impl<'a, B> Ord for MuCow<'a, B>
impl<'a, B> Ord for MuCow<'a, B>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, B> PartialOrd for MuCow<'a, B>
impl<'a, B> PartialOrd for MuCow<'a, B>
impl<'a, B> Eq for MuCow<'a, B>
Auto Trait Implementations§
impl<'a, B> Freeze for MuCow<'a, B>
impl<'a, B> RefUnwindSafe for MuCow<'a, B>
impl<'a, B> Send for MuCow<'a, B>
impl<'a, B> Sync for MuCow<'a, B>
impl<'a, B> Unpin for MuCow<'a, B>
impl<'a, B> !UnwindSafe for MuCow<'a, B>
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