pub struct App {
pub screen: Screen,
pub workspaces: Vec<WorkspaceSummary>,
pub selected: usize,
pub status: Option<StatusMessage>,
pub should_quit: bool,
pub config: Config,
}Expand description
Top-level application state.
Fields§
§screen: Screen§workspaces: Vec<WorkspaceSummary>§selected: usize§status: Option<StatusMessage>§should_quit: bool§config: ConfigImplementations§
Source§impl App
impl App
pub fn new(config: Config) -> Self
Sourcepub fn refresh_workspaces(&mut self)
pub fn refresh_workspaces(&mut self)
Load workspace list from disk.
Sourcepub fn update(&mut self, msg: Message)
pub fn update(&mut self, msg: Message)
Process a message and update state (TEA update function).
Sourcepub fn filtered_repo_indices(
repos: &[RepoEntry],
selected_groups: &HashSet<usize>,
groups: &[GroupEntry],
) -> Vec<usize>
pub fn filtered_repo_indices( repos: &[RepoEntry], selected_groups: &HashSet<usize>, groups: &[GroupEntry], ) -> Vec<usize>
Get the original indices of repos that belong to selected groups.
Sourcepub fn workspace_detail_status(&self) -> Option<WorkspaceStatus>
pub fn workspace_detail_status(&self) -> Option<WorkspaceStatus>
Get detail info for the currently viewed workspace.
Sourcepub fn health_color(health: &WorkspaceHealth) -> Color
pub fn health_color(health: &WorkspaceHealth) -> Color
Color for workspace health status.
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