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§
Sourcefn describe(&self, tense: Tense) -> String
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)
Sourcefn perform(&mut self) -> Result<Option<Box<dyn RollbackStep>>, InstallError>
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§
Sourcefn describe_detailed(&self, tense: Tense) -> String
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)