AsIsMut

Trait AsIsMut 

Source
pub trait AsIsMut: AsIs + BorrowMutAsIs {
    // Provided methods
    fn as_is_mut<'a>(self) -> IsMut<'a, Self::Is>
       where Self: 'a { ... }
    fn into_is_mut<'a, B>(self) -> IsMut<'a, B>
       where Self: 'a,
             Self::Is: BorrowMut<B>,
             B: ?Sized + ToOwned<Owned = Owned<Self>> { ... }
}
Expand description

Used to do a cheap conversion into IsMut<'a, T> in generic contexts.

Provided Methods§

Source

fn as_is_mut<'a>(self) -> IsMut<'a, Self::Is>
where Self: 'a,

Converts self into an IsMut<'a, Self::Is>.

§Panics

If self.as_is() returns an Is::Borrowed variant.

Source

fn into_is_mut<'a, B>(self) -> IsMut<'a, B>
where Self: 'a, Self::Is: BorrowMut<B>, B: ?Sized + ToOwned<Owned = Owned<Self>>,

Converts self into an IsMut<'a, B>.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> AsIsMut for T
where Self: AsIs + BorrowMutAsIs,