pub trait Print {
Show 22 methods
// Required methods
fn print_updating(&self);
fn print_pre_installing(&self);
fn print_installing(&self);
fn print_pre_removing(&self);
fn print_removing(&self);
fn print_documenting(&self);
fn print_updating_pkg_versions(&self, name: &PkgName, is_done: bool);
fn print_downloading_pkg_file(
&self,
name: &PkgName,
is_done: bool,
) -> Result<()>;
fn print_downloading_pkg_file_with_progress(
&self,
name: &PkgName,
byte_count: f64,
total_byte_count: f64,
) -> Result<()>;
fn print_extracting_pkg_file(&self, name: &PkgName, is_done: bool);
fn print_checking_dependent_version_reqs(&self, is_done: bool);
fn print_searching_path_conflicts(&self, is_done: bool);
fn print_documenting_pkg(&self, name: &PkgName, is_done: bool);
fn print_installing_pkg(&self, name: &PkgName, is_done: bool);
fn print_removing_pkg(&self, name: &PkgName, is_done: bool);
fn print_removing_pkg_doc(&self, name: &PkgName, is_done: bool);
fn print_cleaning_after_install(&self, is_done: bool);
fn print_cleaning_before_removal(&self, is_done: bool);
fn print_cleaning_after_error(&self, is_done: bool);
fn print_cleaning(&self, is_done: bool);
fn print_lf_for_error(&self);
fn eprint_error(&self, err: &Error);
}Expand description
A printer trait.
The printer prints messages for a package manager. Some methods of printer has the done flag. the flag should be set if an operation is completed, othersise the flag should be unset.
Required Methods§
Sourcefn print_updating(&self)
fn print_updating(&self)
Prints the “Updating:” message.
Sourcefn print_pre_installing(&self)
fn print_pre_installing(&self)
Prints the “Pre-installing:” message.
Sourcefn print_installing(&self)
fn print_installing(&self)
Prints the “Installing:” message.
Sourcefn print_pre_removing(&self)
fn print_pre_removing(&self)
Prints the “Pre-removing:” message.
Sourcefn print_removing(&self)
fn print_removing(&self)
Prints the “Removing:” message.
Sourcefn print_documenting(&self)
fn print_documenting(&self)
Prints the “Documenting:” message.
Sourcefn print_updating_pkg_versions(&self, name: &PkgName, is_done: bool)
fn print_updating_pkg_versions(&self, name: &PkgName, is_done: bool)
Prints the “Updating package …” message.
Sourcefn print_downloading_pkg_file(
&self,
name: &PkgName,
is_done: bool,
) -> Result<()>
fn print_downloading_pkg_file( &self, name: &PkgName, is_done: bool, ) -> Result<()>
Prints the “Downloading package …” message.
Sourcefn print_downloading_pkg_file_with_progress(
&self,
name: &PkgName,
byte_count: f64,
total_byte_count: f64,
) -> Result<()>
fn print_downloading_pkg_file_with_progress( &self, name: &PkgName, byte_count: f64, total_byte_count: f64, ) -> Result<()>
Prints the “Downloading package …” message with progress.
Sourcefn print_extracting_pkg_file(&self, name: &PkgName, is_done: bool)
fn print_extracting_pkg_file(&self, name: &PkgName, is_done: bool)
Prints the “Extracting package …” message.
Sourcefn print_checking_dependent_version_reqs(&self, is_done: bool)
fn print_checking_dependent_version_reqs(&self, is_done: bool)
Prints the “Checking dependent version requirements …” message.
Sourcefn print_searching_path_conflicts(&self, is_done: bool)
fn print_searching_path_conflicts(&self, is_done: bool)
Prints the “Searching path conflicts …” message.
Sourcefn print_documenting_pkg(&self, name: &PkgName, is_done: bool)
fn print_documenting_pkg(&self, name: &PkgName, is_done: bool)
Prints the “Documenting package …” message.
Sourcefn print_installing_pkg(&self, name: &PkgName, is_done: bool)
fn print_installing_pkg(&self, name: &PkgName, is_done: bool)
Prints the “Installing package …” message.
Sourcefn print_removing_pkg(&self, name: &PkgName, is_done: bool)
fn print_removing_pkg(&self, name: &PkgName, is_done: bool)
Prints the “Removing package …” message.
Sourcefn print_removing_pkg_doc(&self, name: &PkgName, is_done: bool)
fn print_removing_pkg_doc(&self, name: &PkgName, is_done: bool)
Prints the “Removing package documentation …” message.
Sourcefn print_cleaning_after_install(&self, is_done: bool)
fn print_cleaning_after_install(&self, is_done: bool)
Prints the “Cleaning after installation …” message.
Sourcefn print_cleaning_before_removal(&self, is_done: bool)
fn print_cleaning_before_removal(&self, is_done: bool)
Prints the “Cleaning before removal …” messgage.
Sourcefn print_cleaning_after_error(&self, is_done: bool)
fn print_cleaning_after_error(&self, is_done: bool)
Prints the “Cleaning after error …” message.
Sourcefn print_cleaning(&self, is_done: bool)
fn print_cleaning(&self, is_done: bool)
Prints the “Cleaning …” message.
Sourcefn print_lf_for_error(&self)
fn print_lf_for_error(&self)
Prints the newline character for an occurred error.
Sourcefn eprint_error(&self, err: &Error)
fn eprint_error(&self, err: &Error)
Prints the error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".