pub enum IsMut<'a, T>{
Owned(T::Owned),
MutBorrowed(&'a mut T),
}Expand description
Represents an owned or a mutably borrowed data.
Variants§
Trait Implementations§
Source§impl<T, U> AddAssign<U> for IsMut<'_, T>
impl<T, U> AddAssign<U> for IsMut<'_, T>
Source§fn add_assign(&mut self, rhs: U)
fn add_assign(&mut self, rhs: U)
Performs the
+= operation. Read moreSource§impl<T> AsIs for IsMut<'_, T>
impl<T> AsIs for IsMut<'_, T>
Source§fn as_is<'a>(self) -> Is<'a, T>where
Self: 'a,
fn as_is<'a>(self) -> Is<'a, T>where
Self: 'a,
Converts
self into an Is<'a, Self::Is>.Source§fn into_is_cow<'a, B>(self) -> IsCow<'a, B>
fn into_is_cow<'a, B>(self) -> IsCow<'a, B>
Converts
self into an IsCow<'a, B>.Source§impl<T, U, O> BitAnd<U> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut + RefMutBitAnd<Owned<U>, Output = O> + for<'a> RefMutBitAnd<&'a U::Is, Output = O> + for<'a> RefMutBitAnd<&'a mut U::Is, Output = O>,
U: AsIs,
impl<T, U, O> BitAnd<U> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut + RefMutBitAnd<Owned<U>, Output = O> + for<'a> RefMutBitAnd<&'a U::Is, Output = O> + for<'a> RefMutBitAnd<&'a mut U::Is, Output = O>,
U: AsIs,
Source§impl<T, U> BitAndAssign<U> for IsMut<'_, T>where
T: ?Sized + ToOwned + BitAndAssign<Owned<U>> + for<'a> BitAndAssign<&'a U::Is> + for<'a> BitAndAssign<&'a mut U::Is>,
U: AsIs,
T::Owned: BitAndAssign<Owned<U>> + for<'a> BitAndAssign<&'a U::Is> + for<'a> BitAndAssign<&'a mut U::Is>,
impl<T, U> BitAndAssign<U> for IsMut<'_, T>where
T: ?Sized + ToOwned + BitAndAssign<Owned<U>> + for<'a> BitAndAssign<&'a U::Is> + for<'a> BitAndAssign<&'a mut U::Is>,
U: AsIs,
T::Owned: BitAndAssign<Owned<U>> + for<'a> BitAndAssign<&'a U::Is> + for<'a> BitAndAssign<&'a mut U::Is>,
Source§fn bitand_assign(&mut self, rhs: U)
fn bitand_assign(&mut self, rhs: U)
Performs the
&= operation. Read moreSource§impl<T, U, O> BitOr<U> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut + RefMutBitOr<Owned<U>, Output = O> + for<'a> RefMutBitOr<&'a U::Is, Output = O> + for<'a> RefMutBitOr<&'a mut U::Is, Output = O>,
U: AsIs,
impl<T, U, O> BitOr<U> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut + RefMutBitOr<Owned<U>, Output = O> + for<'a> RefMutBitOr<&'a U::Is, Output = O> + for<'a> RefMutBitOr<&'a mut U::Is, Output = O>,
U: AsIs,
Source§impl<T, U> BitOrAssign<U> for IsMut<'_, T>where
T: ?Sized + ToOwned + BitOrAssign<Owned<U>> + for<'a> BitOrAssign<&'a U::Is> + for<'a> BitOrAssign<&'a mut U::Is>,
U: AsIs,
T::Owned: BitOrAssign<Owned<U>> + for<'a> BitOrAssign<&'a U::Is> + for<'a> BitOrAssign<&'a mut U::Is>,
impl<T, U> BitOrAssign<U> for IsMut<'_, T>where
T: ?Sized + ToOwned + BitOrAssign<Owned<U>> + for<'a> BitOrAssign<&'a U::Is> + for<'a> BitOrAssign<&'a mut U::Is>,
U: AsIs,
T::Owned: BitOrAssign<Owned<U>> + for<'a> BitOrAssign<&'a U::Is> + for<'a> BitOrAssign<&'a mut U::Is>,
Source§fn bitor_assign(&mut self, rhs: U)
fn bitor_assign(&mut self, rhs: U)
Performs the
|= operation. Read moreSource§impl<T, U, O> BitXor<U> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut + RefMutBitXor<Owned<U>, Output = O> + for<'a> RefMutBitXor<&'a U::Is, Output = O> + for<'a> RefMutBitXor<&'a mut U::Is, Output = O>,
U: AsIs,
impl<T, U, O> BitXor<U> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut + RefMutBitXor<Owned<U>, Output = O> + for<'a> RefMutBitXor<&'a U::Is, Output = O> + for<'a> RefMutBitXor<&'a mut U::Is, Output = O>,
U: AsIs,
Source§impl<T, U> BitXorAssign<U> for IsMut<'_, T>where
T: ?Sized + ToOwned + BitXorAssign<Owned<U>> + for<'a> BitXorAssign<&'a U::Is> + for<'a> BitXorAssign<&'a mut U::Is>,
U: AsIs,
T::Owned: BitXorAssign<Owned<U>> + for<'a> BitXorAssign<&'a U::Is> + for<'a> BitXorAssign<&'a mut U::Is>,
impl<T, U> BitXorAssign<U> for IsMut<'_, T>where
T: ?Sized + ToOwned + BitXorAssign<Owned<U>> + for<'a> BitXorAssign<&'a U::Is> + for<'a> BitXorAssign<&'a mut U::Is>,
U: AsIs,
T::Owned: BitXorAssign<Owned<U>> + for<'a> BitXorAssign<&'a U::Is> + for<'a> BitXorAssign<&'a mut U::Is>,
Source§fn bitxor_assign(&mut self, rhs: U)
fn bitxor_assign(&mut self, rhs: U)
Performs the
^= operation. Read moreSource§impl<T> BorrowAsIs for IsMut<'_, T>
impl<T> BorrowAsIs for IsMut<'_, T>
Source§fn borrow_or_clone<B>(&self) -> IsCow<'_, B>
fn borrow_or_clone<B>(&self) -> IsCow<'_, B>
Immutably borrows from
self by default, but can be overridden to clone self if
appropriate.Source§fn borrow_as_is(&self) -> &Self::Is
fn borrow_as_is(&self) -> &Self::Is
Immutably borrows from
self as Is.Source§impl<T> BorrowMut<T> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut,
impl<T> BorrowMut<T> for &mut IsMut<'_, T>where
T: ?Sized + ToOwnedMut,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BorrowMut<T> for IsMut<'_, T>where
T: ?Sized + ToOwnedMut,
impl<T> BorrowMut<T> for IsMut<'_, T>where
T: ?Sized + ToOwnedMut,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Default for IsMut<'_, T>
impl<T> Default for IsMut<'_, T>
Source§fn default() -> Self
fn default() -> Self
Creates an owned IsMut<'_, T> with the default value for T::Owned.
Source§impl<T, U> DivAssign<U> for IsMut<'_, T>
impl<T, U> DivAssign<U> for IsMut<'_, T>
Source§fn div_assign(&mut self, rhs: U)
fn div_assign(&mut self, rhs: U)
Performs the
/= operation. Read moreSource§impl<T, U> MulAssign<U> for IsMut<'_, T>
impl<T, U> MulAssign<U> for IsMut<'_, T>
Source§fn mul_assign(&mut self, rhs: U)
fn mul_assign(&mut self, rhs: U)
Performs the
*= operation. Read moreSource§impl<T> Ord for IsMut<'_, T>
impl<T> Ord for IsMut<'_, T>
Source§impl<T, U> PartialOrd<Is<'_, U>> for IsMut<'_, T>
impl<T, U> PartialOrd<Is<'_, U>> for IsMut<'_, T>
Source§impl<T, U> PartialOrd<IsCow<'_, U>> for IsMut<'_, T>
impl<T, U> PartialOrd<IsCow<'_, U>> for IsMut<'_, T>
Source§impl<T, U> PartialOrd<IsMut<'_, U>> for Is<'_, T>
impl<T, U> PartialOrd<IsMut<'_, U>> for Is<'_, T>
Source§impl<T, U> PartialOrd<IsMut<'_, U>> for IsCow<'_, T>
impl<T, U> PartialOrd<IsMut<'_, U>> for IsCow<'_, T>
Source§impl<T, U> PartialOrd<IsMut<'_, U>> for IsMut<'_, T>
impl<T, U> PartialOrd<IsMut<'_, U>> for IsMut<'_, T>
Source§impl<T, U> RemAssign<U> for IsMut<'_, T>
impl<T, U> RemAssign<U> for IsMut<'_, T>
Source§fn rem_assign(&mut self, rhs: U)
fn rem_assign(&mut self, rhs: U)
Performs the
%= operation. Read moreSource§impl<T, U> ShlAssign<U> for IsMut<'_, T>
impl<T, U> ShlAssign<U> for IsMut<'_, T>
Source§fn shl_assign(&mut self, rhs: U)
fn shl_assign(&mut self, rhs: U)
Performs the
<<= operation. Read moreSource§impl<T, U> ShrAssign<U> for IsMut<'_, T>
impl<T, U> ShrAssign<U> for IsMut<'_, T>
Source§fn shr_assign(&mut self, rhs: U)
fn shr_assign(&mut self, rhs: U)
Performs the
>>= operation. Read moreSource§impl<T, U> SubAssign<U> for IsMut<'_, T>
impl<T, U> SubAssign<U> for IsMut<'_, T>
Source§fn sub_assign(&mut self, rhs: U)
fn sub_assign(&mut self, rhs: U)
Performs the
-= operation. Read moreimpl<T> Eq for IsMut<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for IsMut<'a, T>
impl<'a, T> RefUnwindSafe for IsMut<'a, T>
impl<'a, T> Send for IsMut<'a, T>
impl<'a, T> Sync for IsMut<'a, T>
impl<'a, T> Unpin for IsMut<'a, T>
impl<'a, T> !UnwindSafe for IsMut<'a, T>
Blanket Implementations§
Source§impl<T> AsIsMut for Twhere
T: AsIs + BorrowMutAsIs,
impl<T> AsIsMut for Twhere
T: AsIs + BorrowMutAsIs,
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
Source§impl<T> BorrowMutAsIs for T
impl<T> BorrowMutAsIs for T
Source§fn borrow_mut_as_is(&mut self) -> &mut Self::Is
fn borrow_mut_as_is(&mut self) -> &mut Self::Is
Mutably borrows from
self as Is.Source§fn borrow_mut_or_clone<B>(&mut self) -> IsMut<'_, B>
fn borrow_mut_or_clone<B>(&mut self) -> IsMut<'_, B>
Mutably borrows from
self by default, but clones self if self.borrow_or_clone() is overridden to clone self.