pub struct App {Show 17 fields
pub modules: Vec<ModuleFile>,
pub selected_module: usize,
pub current_view: ContentView,
pub current_exercise: usize,
pub input: String,
pub cursor_pos: usize,
pub last_output: Option<ExecutionResult>,
pub submit_state: SubmitState,
pub hints_revealed: usize,
pub show_solution: bool,
pub show_files: bool,
pub show_help: bool,
pub intro_scroll: u16,
pub examples_scroll: u16,
pub output_scroll: u16,
pub progress: Progress,
pub should_quit: bool,
}Fields§
§modules: Vec<ModuleFile>§selected_module: usize§current_view: ContentView§current_exercise: usize§input: String§cursor_pos: usize§last_output: Option<ExecutionResult>§submit_state: SubmitState§hints_revealed: usize§show_solution: bool§show_files: bool§show_help: bool§intro_scroll: u16§examples_scroll: u16§output_scroll: u16§progress: Progress§should_quit: boolImplementations§
Source§impl App
impl App
pub fn new(modules: Vec<ModuleFile>) -> Self
pub fn current_module(&self) -> &ModuleFile
pub fn current_exercise_opt(&self) -> Option<&Exercise>
pub fn exercise_count(&self) -> usize
pub fn module_progress(&self) -> Option<&ModuleProgress>
pub fn exercise_is_completed(&self) -> bool
pub fn input_push(&mut self, c: char)
pub fn input_backspace(&mut self)
pub fn input_delete(&mut self)
pub fn cursor_left(&mut self)
pub fn cursor_right(&mut self)
pub fn cursor_home(&mut self)
pub fn cursor_end(&mut self)
pub fn clear_input(&mut self)
pub fn select_prev_module(&mut self)
pub fn select_next_module(&mut self)
pub fn cycle_view(&mut self)
pub fn next_exercise(&mut self)
pub fn prev_exercise(&mut self)
pub fn submit_command(&mut self)
pub fn reveal_next_hint(&mut self)
pub fn toggle_solution(&mut self)
pub fn toggle_files(&mut self)
pub fn toggle_help(&mut self)
pub fn reset_exercise(&mut self)
pub fn clear_output(&mut self)
pub fn scroll_up(&mut self)
pub fn scroll_down(&mut self)
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin 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