pub struct App {
pub user_id: Uuid,
pub active_tab: Tab,
pub modals: Stack,
pub command_line: Editor,
pub command_line_active: bool,
pub edit_mode: EditMode,
pub status: String,
pub should_quit: bool,
pub console: ConsoleState,
pub console_input_active: bool,
/* private fields */
}Fields§
§user_id: Uuid§active_tab: Tab§modals: Stack§command_line: Editor§command_line_active: bool§edit_mode: EditMode§status: String§should_quit: bool§console: ConsoleStatePure state for the Console tab’s nomiscript REPL.
console_input_active: boolWhether keystrokes are routed into the console input editor. Unlike
command_line_active, the console editor is always Emacs-style
(see ConsoleState::new), so focus has no vim-normal sub-state.
Implementations§
Source§impl App
impl App
pub fn new(user_id: Uuid, edit_mode: EditMode) -> Self
Sourcepub fn queue_chart(&mut self, spec: ChartSpec)
pub fn queue_chart(&mut self, spec: ChartSpec)
Queue a chart for the next frame.
Sourcepub fn take_pending_chart(&mut self) -> Option<ChartSpec>
pub fn take_pending_chart(&mut self) -> Option<ChartSpec>
Drain the queued chart, if any.
pub fn next_tab(&mut self)
pub fn previous_tab(&mut self)
pub fn switch_tab(&mut self, tab: Tab)
pub fn open_command_line(&mut self)
pub fn close_command_line(&mut self)
pub fn set_status(&mut self, msg: impl Into<String>)
pub fn request_quit(&mut self)
pub fn set_edit_mode(&mut self, mode: EditMode)
Sourcepub fn attach_console(&mut self, eval: ConsoleEval)
pub fn attach_console(&mut self, eval: ConsoleEval)
Attach an eval bridge so the Console tab can run forms. Called by
the entry points (sshd handler / standalone bin) once a runtime
Handle is in scope.
Sourcepub fn submit_console_form(&mut self, form: String)
pub fn submit_console_form(&mut self, form: String)
Echo the submitted form into scrollback and route it to the
attached eval. With no eval attached, push a “console not
connected” notice; if the eval worker has stopped, surface an
“eval worker stopped” notice so the console never looks hung.
Sourcepub fn interrupt_console(&self)
pub fn interrupt_console(&self)
Request a cooperative cancel of the in-flight console eval. A no-op when no eval is attached.
Sourcepub fn drain_console(&mut self)
pub fn drain_console(&mut self)
Pull every ready eval result into the console scrollback,
formatting each envelope through format_result. A no-op when
no eval is attached or nothing is ready.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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