#[non_exhaustive]pub enum TargetAction {
Install,
Update {
from: Option<String>,
},
Skip,
DriftedSkip {
installed: String,
},
RefuseNewer {
installed: String,
},
Downgrade {
from: String,
},
}Expand description
The action to take for a single target platform during an install.
§Non-exhaustive
This enum is #[non_exhaustive]: new action variants may be added in
future minor releases. Embedders should render actions via the Display
impl on Report/InstallPlan or match on specific variants they care
about with a catch-all _ arm. The will_write() and is_blocked()
helpers cover the two common branching points without requiring exhaustive
matching.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Install
First-time install (no existing copy).
Update
Overwrite an older installed version.
Skip
Already installed at the same version and checksum — nothing to do.
DriftedSkip
Same version but the on-disk content differs from the bundled content,
and force was not requested.
RefuseNewer
The installed version is newer than the bundled version, and force was
not requested.
Downgrade
The installed version is newer, but force was requested — downgrade.
Implementations§
Source§impl TargetAction
impl TargetAction
Sourcepub fn will_write(&self) -> bool
pub fn will_write(&self) -> bool
Whether this action will write files to disk.
Sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
Whether this action blocks the install from proceeding.
Trait Implementations§
Source§impl Clone for TargetAction
impl Clone for TargetAction
Source§fn clone(&self) -> TargetAction
fn clone(&self) -> TargetAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more