pub enum DynamicSimulation<S: SimulationInfo, E: Editable> {
Default(S),
Simulated(E),
}
Expand description
A dynamic type, able to store simulation infos or editable simulations.
Variants§
Implementations§
Source§impl<S: SimulationInfo, E: Editable> DynamicSimulation<S, E>
impl<S: SimulationInfo, E: Editable> DynamicSimulation<S, E>
Sourcepub fn default_mut(&mut self) -> Option<&mut S>
pub fn default_mut(&mut self) -> Option<&mut S>
Convert the dynamic simulation into a mutable S
Sourcepub fn simulated_mut(&mut self) -> Option<&mut E>
pub fn simulated_mut(&mut self) -> Option<&mut E>
Convert the dynamic simulation into a mutable E
Trait Implementations§
Source§impl<S: SimulationInfo, E: Editable + Deref<Target = S>> Deref for DynamicSimulation<S, E>
impl<S: SimulationInfo, E: Editable + Deref<Target = S>> Deref for DynamicSimulation<S, E>
Source§impl<S: SimulationInfo, E: Editable> From<S> for DynamicSimulation<S, E>
impl<S: SimulationInfo, E: Editable> From<S> for DynamicSimulation<S, E>
Auto Trait Implementations§
impl<S, E> Freeze for DynamicSimulation<S, E>
impl<S, E> RefUnwindSafe for DynamicSimulation<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for DynamicSimulation<S, E>
impl<S, E> Sync for DynamicSimulation<S, E>
impl<S, E> Unpin for DynamicSimulation<S, E>
impl<S, E> UnwindSafe for DynamicSimulation<S, E>where
S: UnwindSafe,
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more