service_install::install

Trait InstallStep

Source
pub trait InstallStep {
    // Required methods
    fn describe(&self, tense: Tense) -> String;
    fn perform(&mut self) -> Result<Option<Box<dyn RollbackStep>>, InstallError>;

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

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

Required Methods§

Source

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

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

Source

fn perform(&mut self) -> Result<Option<Box<dyn RollbackStep>>, InstallError>

Perform this install step making a change to the system. This may return a RollbackStep that can be used to undo the change made in the future. This can be used in an install wizard to roll back changes when an error happens.

§Errors

The system can change between preparing to install and actually installing. For example all disk space could be used. Or the install 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 performing 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 InstallStep

Source§

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

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

impl Display for &dyn InstallStep

Source§

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

Formats the value using the given formatter. Read more

Implementors§