RemoveStep

Trait RemoveStep 

Source
pub trait RemoveStep {
    // Required methods
    fn describe(&self, tense: Tense) -> String;
    fn perform(&mut self) -> Result<(), RemoveError>;

    // Provided method
    fn describe_detailed(&self, tense: Tense) -> String { ... }
}
Expand description

One step in the remove process. Can be executed or described.

Required Methods§

Source

fn describe(&self, tense: Tense) -> String

A short (one line) description of what this step will do to the system. Pass in the tense you want for the description (past, present or future)

Source

fn perform(&mut self) -> Result<(), RemoveError>

Executes this remove step. This can be used when building an uninstall/remove wizard. For example to ask the user confirmation before each step.

§Errors

The system can change between preparing to remove and actually removing the install. For example a file could have been removed by the user of the system. Or the removal could run into an error that was not checked for while preparing. If you find this happens please make an issue.

Provided Methods§

Source

fn describe_detailed(&self, tense: Tense) -> String

A verbose description of what this step will do to the system. Includes as many details as possible. Pass in the tense you want for the description (past, present or future)

Trait Implementations§

Source§

impl Debug for &dyn RemoveStep

Source§

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

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

impl Display for &dyn RemoveStep

Source§

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

Formats the value using the given formatter. Read more

Implementors§