Trait utility_programming::Modifier [] [src]

pub trait Modifier<T> {
    type Change;
    fn modify(&mut self, obj: &mut T) -> Self::Change;
fn undo(&mut self, change: &Self::Change, obj: &mut T);
fn redo(&mut self, change: &Self::Change, obj: &mut T); }

Modifies objects in a way that can be reversed.

Associated Types

The change applied to an object.

Required Methods

Modify an object and return the change.

This might be indeterministic.

Undo change made to an object.

Required to be deterministic.

Redo change made to an object.

Required to be deterministic.

Implementations on Foreign Types

impl<T, U: Modifier<T>> Modifier<T> for Vec<U>
[src]

[src]

[src]

[src]

Implementors