pub enum MutIfOwned<'a, B>{
Const(&'a B),
Mut(&'a mut B::Owned),
}Expand description
Either an immutable reference to a borrowing object, or a mutable reference to an owning one.
Returned by StaticCow::mut_if_owned.
Variants§
Const(&'a B)
An immutable reference to a borrowing object.
Mut(&'a mut B::Owned)
A mutable reference to an owning object.
Trait Implementations§
Source§impl<'a, B> Debug for MutIfOwned<'a, B>
impl<'a, B> Debug for MutIfOwned<'a, B>
Source§impl<'a, B> PartialEq for MutIfOwned<'a, B>
impl<'a, B> PartialEq for MutIfOwned<'a, B>
impl<'a, B> Eq for MutIfOwned<'a, B>
impl<'a, B> StructuralPartialEq for MutIfOwned<'a, B>
Auto Trait Implementations§
impl<'a, B> Freeze for MutIfOwned<'a, B>where
B: ?Sized,
impl<'a, B> RefUnwindSafe for MutIfOwned<'a, B>
impl<'a, B> Send for MutIfOwned<'a, B>
impl<'a, B> Sync for MutIfOwned<'a, B>
impl<'a, B> Unpin for MutIfOwned<'a, B>where
B: ?Sized,
impl<'a, B> !UnwindSafe for MutIfOwned<'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