Trait EnumMut

Source
pub trait EnumMut {
    type Mut<'a>
       where Self: 'a;

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

Trait implemented by enum types for exclusive access.

This trait usually is implemented via #[derive(EnumMut)].

Required Associated Types§

Source

type Mut<'a> where Self: 'a

A wrapper type around Self for shared access.

Required Methods§

Source

fn as_mut(&mut self) -> Self::Mut<'_>

Returns an exlusive reference wrapper to self.

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§