pub enum LoadingState {
Idle,
Loading,
Loaded,
Failed,
}Expand description
Loading state for registry data fetching.
Tracks the current state of background registry operations to provide user feedback about data availability.
§State Transitions
Complete state machine diagram showing all valid transitions:
┌─────┐
│Idle │ (Initial state: no data loaded, not loading)
└──┬──┘
│
│ didOpen/didChange
│ (start fetching)
▼
┌────────┐
│Loading │ (Fetching registry data)
└───┬────┘
│
├─────── Success ──────┐
│ ▼
│ ┌────────┐
│ │Loaded │ (Data cached and ready)
│ └───┬────┘
│ │
│ │ didChange/refresh
│ │ (re-fetch)
│ │
│ ▼
│ ┌────────┐
│ │Loading │
│ └────────┘
│
└─────── Error ─────────┐
▼
┌────────┐
│Failed │ (Fetch failed, old cache may exist)
└───┬────┘
│
│ didChange/retry
│ (try again)
│
▼
┌────────┐
│Loading │
└────────┘§Key Behaviors
- Idle: Initial state when no data has been fetched yet
- Loading: Actively fetching from registry (may show loading indicator)
- Loaded: Successfully fetched and cached data
- Failed: Network/registry error occurred (falls back to old cache if available)
§Thread Safety
This enum is Copy for efficient passing across thread boundaries in async contexts.
Variants§
Idle
No data loaded, not currently loading
Loading
Currently fetching registry data
Loaded
Data fetched and cached
Failed
Fetch failed (old cached data may still be available)
Trait Implementations§
Source§impl Clone for LoadingState
impl Clone for LoadingState
Source§fn clone(&self) -> LoadingState
fn clone(&self) -> LoadingState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoadingState
impl Debug for LoadingState
Source§impl Default for LoadingState
impl Default for LoadingState
Source§fn default() -> LoadingState
fn default() -> LoadingState
Returns the “default value” for a type. Read more
Source§impl PartialEq for LoadingState
impl PartialEq for LoadingState
impl Copy for LoadingState
impl Eq for LoadingState
impl StructuralPartialEq for LoadingState
Auto Trait Implementations§
impl Freeze for LoadingState
impl RefUnwindSafe for LoadingState
impl Send for LoadingState
impl Sync for LoadingState
impl Unpin for LoadingState
impl UnwindSafe for LoadingState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.