IntoPartialRefMut

Trait IntoPartialRefMut 

Source
pub trait IntoPartialRefMut<'a>: IntoPartialRef<'a> {
    // Required method
    fn into_partial_ref_mut(self) -> Self::Ref;
}
Expand description

Construction of partial references from mutable references.

This has an implementation for mutable references that implement IntoPartialRefMut. It performs the same operation as IntoPartialRefMut but is only implemented for mutable references. This is useful as it allows writing value.into_partial_ref_mut() instead of (&mut value).into_partial_ref_mut() using auto referencing of method calls. Using just [value.into_partial_ref()] would result in an immutable reference.

Required Methods§

Source

fn into_partial_ref_mut(self) -> Self::Ref

Convert a mutable reference into a partial reference.

Implementations on Foreign Types§

Source§

impl<'a, T> IntoPartialRefMut<'a> for &'a mut T
where Self: IntoPartialRef<'a>,

Implementors§