Skip to main content

App

Struct App 

Source
pub struct App {
Show 44 fields pub workspace: Workspace, pub project: Project, pub settings: Settings, pub keymap: Keymap, pub theme: Theme, pub page: Page, pub focus: Panel, pub scroll: ScrollState, pub project_files: Vec<PathBuf>, pub explorer_selected: usize, pub mode: Mode, pub status: Status, pub debugger: StateMachine, pub registers: RegisterFile, pub breakpoints: BreakpointSet, pub memory: MemoryBlock, pub memory_address: Option<u64>, pub stack: MemoryBlock, pub recording: bool, pub at_exit: bool, pub frames: Vec<Frame>, pub frame_selected: usize, pub disassembly: Vec<DisassemblyLine>, pub current_address: Option<u64>, pub current_line: Option<(PathBuf, usize)>, pub build: Option<BuildOutcome>, pub last_run: Option<ProcessOutput>, pub output: Vec<String>, pub terminal: Option<TerminalScreen>, pub diagnostics: Vec<Diagnostic>, pub register_format: Format, pub disassembly_syntax: Syntax, pub ide_page: Page, pub scratchpad: Scratchpad, pub scratchpad_result: Option<Result<Outcome, String>>, pub learning: Progress, pub clipboard: String, pub instructions: Database, pub syscalls: Database, pub syscall_query: String, pub syscall_selected: usize, pub breakpoint_selected: usize, pub search_query: String, pub should_quit: bool, /* private fields */
}
Expand description

Everything the interface shows.

Fields§

§workspace: Workspace

Open documents.

§project: Project

The project being worked on.

§settings: Settings

User settings.

§keymap: Keymap

Key bindings.

§theme: Theme

Colours and glyphs.

§page: Page

The page on show.

§focus: Panel

Which panel has focus. Always one of App::page’s panels.

§scroll: ScrollState

How far each panel is scrolled.

§project_files: Vec<PathBuf>

The project’s files, as the explorer last found them.

§explorer_selected: usize

Which row of the explorer’s file list is selected.

§mode: Mode

What the interface is doing.

§status: Status

The status bar message.

§debugger: StateMachine

The debug session’s state.

§registers: RegisterFile

Register values at the last stop.

§breakpoints: BreakpointSet

Breakpoints the user has asked for.

§memory: MemoryBlock

The memory currently on show.

§memory_address: Option<u64>

The address the memory panel is looking at.

§stack: MemoryBlock

Stack contents around the stack pointer.

§recording: bool

Whether execution is being recorded, so it can be stepped backwards.

§at_exit: bool

Whether recording halted the program just before it exits.

§frames: Vec<Frame>

The call stack at the last stop, innermost frame first.

§frame_selected: usize

Which frame the call stack panel highlights.

§disassembly: Vec<DisassemblyLine>

The disassembly on show.

§current_address: Option<u64>

Where execution is stopped.

§current_line: Option<(PathBuf, usize)>

The source line execution is stopped at.

§build: Option<BuildOutcome>

The last build’s result.

§last_run: Option<ProcessOutput>

The last program run’s result.

§output: Vec<String>

Lines shown in the output panel.

§terminal: Option<TerminalScreen>

A live VT screen while an interactive program owns the Output panel.

§diagnostics: Vec<Diagnostic>

Diagnostics from the last build.

§register_format: Format

How register values are shown.

§disassembly_syntax: Syntax

Which operand order the disassembly uses.

§ide_page: Page

Whether the learning panel is showing.

§scratchpad: Scratchpad

The snippet being tried, and the values it starts from.

§scratchpad_result: Option<Result<Outcome, String>>

What the last snippet produced, or why it could not run.

§learning: Progress

Where the reader is in the material.

§clipboard: String

Text cut or copied, used by paste.

§instructions: Database

Instruction semantics, loaded once.

§syscalls: Database

The syscall table, loaded once.

§syscall_query: String

The syscall panel’s query.

§syscall_selected: usize

Which syscall is highlighted.

§breakpoint_selected: usize

Which breakpoint is highlighted.

§search_query: String

The search query in effect.

§should_quit: bool

Whether the application should exit.

Implementations§

Source§

impl App

Source

pub fn new(project: Project, settings: Settings) -> Result<Self, Error>

Creates the application for a project.

Source

pub fn open_page(&mut self, page: Page)

Opens a page, moving focus onto it.

Source

pub fn focus_panel(&mut self, panel: Panel)

Focuses a panel, opening a page that shows it if necessary.

Source

pub fn apply(&mut self, command: &Command) -> Effect

Applies a command, returning any I/O the run loop must perform.

Source

pub fn cancel_overlay(&mut self)

Cancels whatever overlay is open.

Source

pub fn accept_prompt(&mut self) -> Effect

Accepts the current prompt’s answer.

Source

pub fn refresh_picker(&mut self)

Recomputes the open picker’s matches for its query.

Source

pub fn accept_picker(&mut self) -> Effect

Jumps to the picker’s highlighted match.

Source

pub fn close_active_document(&mut self)

Closes the active document after callers have handled unsaved changes.

Source

pub fn accept_palette(&mut self) -> Effect

Runs the highlighted palette command.

Source

pub fn finish_build(&mut self, outcome: BuildOutcome)

Records a finished build.

Source

pub fn fail_build(&mut self, message: impl Into<String>)

Records that a build could not be attempted.

Source

pub fn finish_run(&mut self, output: ProcessOutput)

Records a finished program run.

Source

pub fn finish_terminal(&mut self)

Freezes a live terminal into the ordinary scrollable Output log.

Source

pub fn refresh_project_files(&mut self)

Re-reads the project’s files for the explorer.

Source

pub fn move_explorer_selection(&mut self, rows: isize)

Moves the explorer’s selection by rows, keeping it in the list.

Source

pub fn open_selected_file(&mut self) -> Effect

Opens the file the explorer has selected.

Source

pub fn show_file(&mut self, path: &Path) -> bool

Makes path the active document, opening it if necessary.

Source

pub fn toggle_breakpoint_in(&mut self, path: &Path, line: usize) -> Effect

Adds or removes a breakpoint on one-based line of path.

Source

pub fn diagnostic_at(&self, path: &Path, line: usize) -> Option<&Diagnostic>

The first build message on one-based line of path.

Source

pub fn pending_breakpoints(&self) -> Vec<Location>

The breakpoint locations that still need sending to the debugger.

Source

pub fn matching_syscalls(&self) -> Vec<&Syscall>

The syscalls matching the current query.

Source

pub fn current_explanation(&self) -> Option<Explanation>

The explanation for the instruction currently in view.

Source

pub fn show_execution(&mut self)

The open document for a path GDB reported.

Source

pub fn follow_execution(&mut self) -> bool

Moves the editor to the file and line execution stopped on.

Source

pub fn resolve_reported_path(&self, reported: &Path) -> PathBuf

Turns a path a tool reported into one that can be opened.

Source

pub fn index_of_document(&self, path: &Path) -> Option<usize>

The index of the open document for a path a tool reported.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more