Trait stabby_abi::as_mut::IGuardMut

source ·
pub trait IGuardMut<T: ?Sized>: IGuardRef<T> {
    type GuardMut<'a>: DerefMut<Target = T>
       where Self: 'a;

    // Required method
    fn guard_mut_inner(&mut self) -> Self::GuardMut<'_>;
}
Expand description

Allows exposing an mutable reference to a temporary conversion.

Required Associated Types§

source

type GuardMut<'a>: DerefMut<Target = T> where Self: 'a

The type of the guard which will clean up the temporary after applying its changes to the original.

Required Methods§

source

fn guard_mut_inner(&mut self) -> Self::GuardMut<'_>

Construct the temporary and guard it through a mutable reference.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Into<As>, As: Into<T>> IGuardMut<As> for T

§

type GuardMut<'a> = MutAs<'a, T, As> where Self: 'a