pub enum LeafState {
NotCached,
Downloaded,
UpdateAvailable,
LocalOnly,
Unavailable,
}Expand description
Where a leaf stands between the server and this computer.
Variants§
NotCached
Downloaded
Cached at exactly the sha the server lists.
UpdateAvailable
Cached, but the server lists a different sha.
LocalOnly
Cached and no longer listed: withdrawn, or no longer granted. Still installable.
Installed, and in neither the catalogue nor the cache, so nothing can reinstall it; shown so the user can keep it, since Apply removes what is unselected.
Implementations§
Source§impl LeafState
impl LeafState
Sourcepub fn has_payload(self) -> bool
pub fn has_payload(self) -> bool
Whether some payload is on this computer, an outdated one included, so the leaf installs offline.
Sourcepub fn needs_download(self) -> bool
pub fn needs_download(self) -> bool
Not the negation of has_payload: an update has old bytes yet still needs the new ones.
Trait Implementations§
impl Copy for LeafState
impl Eq for LeafState
impl StructuralPartialEq for LeafState
Auto Trait Implementations§
impl Freeze for LeafState
impl RefUnwindSafe for LeafState
impl Send for LeafState
impl Sync for LeafState
impl Unpin for LeafState
impl UnsafeUnpin for LeafState
impl UnwindSafe for LeafState
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