[−][src]Enum into_owned::GyuMut
Represents an owned value or a mutably borrowed reference.
GyuMut
(not GyuNyu
牛乳: cow's milk) is similar to Cow<'a, B>
.
Unlike Cow<'a, B>
, it cannot hold an immutably borrowed reference but a mutably borrowed reference.
It can be created by the try_into_gyu_mut
method or to_gyu_mut
method on IntoOwned
.
This enum, as a clone-on-write smart pointer, is highly experimental. Most parts are subject to change. Especially, more traits (e.g. from core::ops) will be implemented.
Variants
MutBorrowed(&'a mut T)
Trait Implementations
impl<'_, T, U> AsMut<U> for GyuMut<'_, T> where
T: Owned + AsMut<U>,
U: ?Sized,
[src]
T: Owned + AsMut<U>,
U: ?Sized,
impl<'_, T, U> AsRef<U> for GyuMut<'_, T> where
T: Owned + AsRef<U>,
U: ?Sized,
[src]
T: Owned + AsRef<U>,
U: ?Sized,
impl<'_, T> Binary for GyuMut<'_, T> where
T: Owned + Binary,
[src]
T: Owned + Binary,
impl<'_, T> Borrow<T> for GyuMut<'_, T> where
T: Owned,
[src]
T: Owned,
impl<'_, T> BorrowMut<T> for GyuMut<'_, T> where
T: Owned,
[src]
T: Owned,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'_, T> Clone for GyuMut<'_, T> where
T: Owned + Clone,
[src]
T: Owned + Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
[src]
impl<'a, T: Debug> Debug for GyuMut<'a, T> where
T: Owned,
[src]
T: Owned,
impl<'_, T> Default for GyuMut<'_, T> where
T: Owned + Default,
[src]
T: Owned + Default,
impl<'_, T> Deref for GyuMut<'_, T> where
T: Owned,
[src]
T: Owned,
impl<'_, T> DerefMut for GyuMut<'_, T> where
T: Owned,
[src]
T: Owned,
impl<'_, T> Display for GyuMut<'_, T> where
T: Owned + Display,
[src]
T: Owned + Display,
impl<'_, T> Eq for GyuMut<'_, T> where
T: Owned + Eq,
[src]
T: Owned + Eq,
impl<'_, T> Hash for GyuMut<'_, T> where
T: Owned + Hash,
[src]
T: Owned + Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'_, T> IntoOwned for GyuMut<'_, T> where
T: Owned,
[src]
T: Owned,
type Owned = T
The owned type associated with Self
.
fn as_is<'a>(self) -> Is<'a, Self::Owned> where
Self: 'a,
[src]
Self: 'a,
fn into_owned(self) -> Self::Owned where
Self::Owned: Clone,
[src]
Self::Owned: Clone,
fn into_gyu<'a>(self) -> Gyu<'a, Self::Owned> where
Self: 'a,
[src]
Self: 'a,
fn try_into_gyu_mut<'a>(self) -> Option<GyuMut<'a, Self::Owned>> where
Self: 'a,
[src]
Self: 'a,
fn to_gyu_mut<'a>(self) -> GyuMut<'a, Self::Owned> where
Self: 'a,
Self::Owned: Clone,
[src]
Self: 'a,
Self::Owned: Clone,
fn into_cow<'a, B: ?Sized>(self) -> Cow<'a, B> where
Self: 'a,
Self::Owned: Borrow<B>,
B: ToOwned<Owned = Self::Owned>,
[src]
Self: 'a,
Self::Owned: Borrow<B>,
B: ToOwned<Owned = Self::Owned>,
impl<'_, T> LowerExp for GyuMut<'_, T> where
T: Owned + LowerExp,
[src]
T: Owned + LowerExp,
impl<'_, T> LowerHex for GyuMut<'_, T> where
T: Owned + LowerHex,
[src]
T: Owned + LowerHex,
impl<'_, T> Octal for GyuMut<'_, T> where
T: Owned + Octal,
[src]
T: Owned + Octal,
impl<'_, T> Ord for GyuMut<'_, T> where
T: Owned + Ord,
[src]
T: Owned + Ord,
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'_, '_, T, U> PartialEq<GyuMut<'_, U>> for GyuMut<'_, T> where
T: Owned + PartialEq<U>,
U: Owned,
[src]
T: Owned + PartialEq<U>,
U: Owned,
impl<'_, '_, T, U> PartialOrd<GyuMut<'_, U>> for GyuMut<'_, T> where
T: Owned + PartialOrd<U>,
U: Owned,
[src]
T: Owned + PartialOrd<U>,
U: Owned,
fn partial_cmp(&self, other: &GyuMut<U>) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'_, T> UpperExp for GyuMut<'_, T> where
T: Owned + UpperExp,
[src]
T: Owned + UpperExp,
impl<'_, T> UpperHex for GyuMut<'_, T> where
T: Owned + UpperHex,
[src]
T: Owned + UpperHex,
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for GyuMut<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for GyuMut<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for GyuMut<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for GyuMut<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> !UnwindSafe for GyuMut<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,