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,
/* 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: boolImplementations§
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)
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 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
§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>
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