pub struct App {
pub recording: RecordedSimulation,
pub frame_index: usize,
pub playing: bool,
pub selected_plot: usize,
pub plots: [PlotConfig; 4],
pub speed_index: usize,
pub window_size_index: usize,
}Fields§
§recording: RecordedSimulation§frame_index: usize§playing: bool§selected_plot: usize§plots: [PlotConfig; 4]§speed_index: usize§window_size_index: usizeImplementations§
Source§impl App
impl App
pub fn new(recording: RecordedSimulation) -> Self
pub fn current_tick(&self) -> u64
pub fn current_snapshot(&self) -> &SimulationSnapshot
pub fn speed_label(&self) -> String
pub fn window_size_ticks(&self) -> u64
pub fn advance(&mut self)
pub fn rewind(&mut self)
pub fn recent_events(&self, count: usize) -> Vec<&TimelineEvent>
pub fn handle_tick(&mut self)
pub fn handle_key(&mut self, key: KeyEvent) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe for App
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more