pub struct App {
pub vendors: Vec<VendorId>,
pub active: usize,
pub tabs: Vec<TabState>,
pub theme: Theme,
pub last_refresh: DateTime<Utc>,
pub quit: bool,
pub settings: Option<SettingsState>,
}Fields§
§vendors: Vec<VendorId>§active: usize§tabs: Vec<TabState>§theme: Theme§last_refresh: DateTime<Utc>§quit: bool§settings: Option<SettingsState>When Some, the Settings overlay is open and consuming key events.
Implementations§
Source§impl App
impl App
pub fn new(vendors: Vec<VendorId>) -> Self
Sourcepub fn with_theme(vendors: Vec<VendorId>, theme: Theme) -> Self
pub fn with_theme(vendors: Vec<VendorId>, theme: Theme) -> Self
Like App::new but with an explicit theme. Lets tests build an App
without reading the real Omarchy theme file
($HOME/.config/omarchy/current/theme/colors.toml) — new resolves
that path and the $HOME env var via merged_with_omarchy, which is
not hermetic. Production code uses new/new_with_primary.
Sourcepub fn new_with_primary(
vendors: Vec<VendorId>,
primary: Option<VendorId>,
) -> Self
pub fn new_with_primary( vendors: Vec<VendorId>, primary: Option<VendorId>, ) -> Self
Construct with an initial active tab — usually [ui] primary from
config. Silently falls through to index 0 if the requested vendor
isn’t in vendors (e.g. it was disabled).
pub fn active_vendor(&self) -> Option<VendorId>
pub fn select_primary(&mut self, primary: Option<VendorId>)
pub fn next_tab(&mut self)
pub fn prev_tab(&mut self)
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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