Enum UpdateRecovery
pub enum UpdateRecovery {
Nothing,
Swept {
removed: usize,
kept: Vec<(PathBuf, String)>,
},
Restored {
kept: Vec<(PathBuf, String)>,
},
Ambiguous {
displaced: Vec<PathBuf>,
kept: Vec<(PathBuf, String)>,
},
Occupied {
displaced: PathBuf,
occupant: PathBuf,
kept: Vec<(PathBuf, String)>,
},
Displaced {
displaced: Vec<PathBuf>,
kept: Vec<(PathBuf, String)>,
},
}Expand description
What PluginHost::recover_interrupted_update found for one package.
Every outcome but Nothing carries kept: the generations marked for
deletion that recovery found and could not delete, each with where it was
left and why. UpdateRecovery::kept returns them whatever else recovery
did.
Variants§
Nothing
There was nothing to put back or delete. Abandoned stages and empty transactions may have been cleared.
Swept
Out-of-date generations earlier updates claimed, or marked for
deletion, were found. removed were deleted. kept could not be, each
with where it was left and why: a generation marked for deletion is
never loaded or put back, while one whose marking failed is still a
claim.
Restored
The package was missing, and the one generation an interrupted update
claimed was put back and discovery ran again. The configured policy
decides whether it is admitted; PluginHost::get_plugin says whether
it was.
Ambiguous
The package is missing and more than one interrupted update claimed a generation of it, so which was installed last is not known. Nothing was moved.
Occupied
The package is not loaded, but something already occupies its name, so the claimed generation was not moved onto it.
Displaced
PluginHost::sweep_interrupted_update found the package missing and
a generation of it that an interrupted update claimed, and left the
claim where it is: only recovering the package by name puts it back.
Implementations§
Trait Implementations§
Source§impl Debug for UpdateRecovery
impl Debug for UpdateRecovery
impl Eq for UpdateRecovery
Source§impl PartialEq for UpdateRecovery
impl PartialEq for UpdateRecovery
impl StructuralPartialEq for UpdateRecovery
Auto Trait Implementations§
impl Freeze for UpdateRecovery
impl RefUnwindSafe for UpdateRecovery
impl Send for UpdateRecovery
impl Sync for UpdateRecovery
impl Unpin for UpdateRecovery
impl UnsafeUnpin for UpdateRecovery
impl UnwindSafe for UpdateRecovery
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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
key and return true if they are equal.