Trait stabby_abi::as_mut::IGuardRef

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

    // Required method
    fn guard_ref_inner(&self) -> Self::Guard<'_>;
}
Expand description

Allows exposing an immutable reference to a temporary conversion.

Required Associated Types§

source

type Guard<'a>: Deref<Target = T> where Self: 'a

The type of the guard which will clean up the temporary.

Required Methods§

source

fn guard_ref_inner(&self) -> Self::Guard<'_>

Construct the temporary and guard it through an immutable reference.

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Guard<'a> = RefAs<'a, T, As> where Self: 'a