Skip to main content

EnumUpdate

Trait EnumUpdate 

Source
pub trait EnumUpdate<U> {
    // Required method
    fn apply(&mut self, update: U);
}
Expand description

Implemented on structs that have their updates represented by some enum U. Implement this trait using the derive macro EnumUpdate.

Required Methods§

Source

fn apply(&mut self, update: U)

Apply the given update and mutate the state.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§