Editable

Trait Editable 

Source
pub trait Editable {
    type Edit<'a>
       where Self: 'a;

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

A trait for types that can be safely edited without invalidating their associated states.

Required Associated Types§

Source

type Edit<'a> where Self: 'a

The type used for safe edits and refreshing the state.

Required Methods§

Source

fn edit(&mut self) -> Self::Edit<'_>

Creates a type which allows safe edits to the info without invalidating the states, and automatically refreshes the states when the edit type goes out of scope.

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<Info: EditableSimulationInfo> Editable for MultiSimulation<Info>

Source§

type Edit<'a> = MultiSimulationEdit<'a, Info> where Self: 'a

Source§

impl<Info: EditableSimulationInfo> Editable for OwnedSimulation<Info>

Source§

type Edit<'a> = OwnedSimulationEdit<'a, Info> where Self: 'a