Skip to main content

ContainersOverviewState

Struct ContainersOverviewState 

Source
pub struct ContainersOverviewState { /* private fields */ }

Implementations§

Source§

impl ContainersOverviewState

Source

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.

Source

pub fn clear_refresh(&mut self)

Drop the active refresh batch. Called when the queue drains and in-flight count returns to zero.

Source

pub fn sort_mode(&self) -> ContainersSortMode

Source

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.

Source

pub fn view_mode(&self) -> ViewMode

Source

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.

Source

pub fn collapsed_hosts(&self) -> &HashSet<String>

Source

pub fn toggle_host_collapsed(&mut self, alias: &str) -> bool

Fold or unfold a host group; returns the new collapsed state.

Source

pub fn refresh_batch(&self) -> Option<&RefreshBatch>

Source

pub fn refresh_batch_mut(&mut self) -> Option<&mut RefreshBatch>

Source

pub fn auto_list_in_flight(&self) -> &HashSet<String>

Source

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.

Source

pub fn mark_auto_list_pending(&mut self, alias: String)

Mark a scroll-driven auto-listing as in flight for alias.

Source

pub fn clear_auto_list_pending(&mut self, alias: &str)

Clear the in-flight marker once an auto-listing arrives.

Source

pub fn inspect_cache(&self) -> &InspectCache

Source

pub fn inspect_cache_mut(&mut self) -> &mut InspectCache

Source

pub fn logs_cache(&self) -> &LogsCache

Source

pub fn logs_cache_mut(&mut self) -> &mut LogsCache

Source

pub fn view_cache(&self) -> &RefCell<Option<(u64, Vec<ContainerListItem>)>>

Source

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).

Source

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.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ContainersOverviewState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V