pub struct ContainersOverviewState { /* private fields */ }Implementations§
Source§impl ContainersOverviewState
impl ContainersOverviewState
Sourcepub fn start_refresh(&mut self, batch: RefreshBatch)
pub fn start_refresh(&mut self, batch: RefreshBatch)
Install a fresh refresh batch. Caller is responsible for spawning the initial parallel listings after this call; this method only owns the state slot.
Sourcepub fn clear_refresh(&mut self)
pub fn clear_refresh(&mut self)
Drop the active refresh batch. Called when the queue drains and in-flight count returns to zero.
pub fn sort_mode(&self) -> ContainersSortMode
Sourcepub fn set_sort_mode_ephemeral(&mut self, mode: ContainersSortMode)
pub fn set_sort_mode_ephemeral(&mut self, mode: ContainersSortMode)
Set the sort mode without persisting to preferences. Demo mode and
tests only; the persisting path is set_sort_mode.
pub fn view_mode(&self) -> ViewMode
Sourcepub fn set_view_mode_ephemeral(&mut self, mode: ViewMode)
pub fn set_view_mode_ephemeral(&mut self, mode: ViewMode)
Set the view mode without persisting to preferences. Demo mode and
tests only; the persisting path is set_view_mode.
pub fn collapsed_hosts(&self) -> &HashSet<String>
Sourcepub fn toggle_host_collapsed(&mut self, alias: &str) -> bool
pub fn toggle_host_collapsed(&mut self, alias: &str) -> bool
Fold or unfold a host group; returns the new collapsed state.
pub fn refresh_batch(&self) -> Option<&RefreshBatch>
pub fn refresh_batch_mut(&mut self) -> Option<&mut RefreshBatch>
pub fn auto_list_in_flight(&self) -> &HashSet<String>
Sourcepub fn auto_list_pending(&self, alias: &str) -> bool
pub fn auto_list_pending(&self, alias: &str) -> bool
True when a scroll-driven auto-listing is already in flight for
alias, so the helper skips a re-spawn.
Sourcepub fn mark_auto_list_pending(&mut self, alias: String)
pub fn mark_auto_list_pending(&mut self, alias: String)
Mark a scroll-driven auto-listing as in flight for alias.
Sourcepub fn clear_auto_list_pending(&mut self, alias: &str)
pub fn clear_auto_list_pending(&mut self, alias: &str)
Clear the in-flight marker once an auto-listing arrives.
pub fn inspect_cache(&self) -> &InspectCache
pub fn inspect_cache_mut(&mut self) -> &mut InspectCache
pub fn logs_cache(&self) -> &LogsCache
pub fn logs_cache_mut(&mut self) -> &mut LogsCache
pub fn view_cache(&self) -> &RefCell<Option<(u64, Vec<ContainerListItem>)>>
Sourcepub fn set_view_mode(&mut self, mode: ViewMode) -> Result<()>
pub fn set_view_mode(&mut self, mode: ViewMode) -> Result<()>
Update view_mode and persist. Returns the persist error so the
caller can surface it (current call site discards it intentionally
to match the pre-encapsulation behavior where view-mode persist
failures only logged).
Sourcepub fn set_sort_mode(&mut self, mode: ContainersSortMode) -> Result<()>
pub fn set_sort_mode(&mut self, mode: ContainersSortMode) -> Result<()>
Update sort_mode and persist. Same contract as set_view_mode;
the call site does surface the error via a toast.
Sourcepub fn migrate_alias(&mut self, old: &str, new: &str) -> bool
pub fn migrate_alias(&mut self, old: &str, new: &str) -> bool
Rename an alias across every alias-keyed set in this state.
Returns true when collapsed_hosts changed so the caller can
persist; auto_list_in_flight and refresh_batch.in_flight_aliases
are also migrated but are not persistent so they do not affect
the return value. No-op (returns false) when old == new.
Trait Implementations§
Source§impl Debug for ContainersOverviewState
impl Debug for ContainersOverviewState
Auto Trait Implementations§
impl !Freeze for ContainersOverviewState
impl !RefUnwindSafe for ContainersOverviewState
impl Send for ContainersOverviewState
impl !Sync for ContainersOverviewState
impl Unpin for ContainersOverviewState
impl UnsafeUnpin for ContainersOverviewState
impl UnwindSafe for ContainersOverviewState
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
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