pub struct IndicatifReporter<F> { /* private fields */ }Expand description
A Reporter implementation to outputs progress bars using indicatif.
Implementations§
Source§impl IndicatifReporter<DefaultProgressFormatter>
impl IndicatifReporter<DefaultProgressFormatter>
Sourcepub fn builder() -> IndicatifReporterBuilder<DefaultProgressFormatter>
pub fn builder() -> IndicatifReporterBuilder<DefaultProgressFormatter>
Returns a builder to construct a IndicatifReporter.
Trait Implementations§
Source§impl<F: ProgressFormatter + Send> Reporter for IndicatifReporter<F>
impl<F: ProgressFormatter + Send> Reporter for IndicatifReporter<F>
Source§fn on_transaction_start(
&self,
transaction: &Transaction<PrefixRecord, RepoDataRecord>,
)
fn on_transaction_start( &self, transaction: &Transaction<PrefixRecord, RepoDataRecord>, )
Called when the transaction starts. This is the first method called.
Source§fn on_transaction_operation_start(&self, _operation: usize)
fn on_transaction_operation_start(&self, _operation: usize)
Called when a transaction operation starts. During the operation the
cache is populated, previous installations are uninstalled and new
installations are linked. Read more
Source§fn on_populate_cache_start(
&self,
operation: usize,
_record: &RepoDataRecord,
) -> usize
fn on_populate_cache_start( &self, operation: usize, _record: &RepoDataRecord, ) -> usize
Called when starting to populate the cache for a package. This is called
for any new package that will be installed. Before installation any
package is first added to the cache. Read more
Source§fn on_validate_start(&self, cache_entry: usize) -> usize
fn on_validate_start(&self, cache_entry: usize) -> usize
Called when validation of a package starts. If a package is already
present in the cache, the contents of the package is validated
against its manifest, this is done to ensure that the package is not
corrupted.
Source§fn on_validate_complete(&self, cache_entry: usize)
fn on_validate_complete(&self, cache_entry: usize)
Called when validation completes. If the package is valid, the package
is immediately used and no downloading is required. Read more
Source§fn on_download_start(&self, cache_entry: usize) -> usize
fn on_download_start(&self, cache_entry: usize) -> usize
Called when a download starts. If a package is not present in the cache
or the package in the cache is corrupt, the package is downloaded. This
function is called right before that happens. Read more
Source§fn on_download_progress(
&self,
cache_entry: usize,
progress: u64,
_total: Option<u64>,
)
fn on_download_progress( &self, cache_entry: usize, progress: u64, _total: Option<u64>, )
Called with regular updates on the download progress. Read more
Source§fn on_download_completed(&self, cache_entry: usize)
fn on_download_completed(&self, cache_entry: usize)
Called when a download completes. Read more
Source§fn on_populate_cache_complete(&self, _cache_entry: usize)
fn on_populate_cache_complete(&self, _cache_entry: usize)
Called when the cache for a package was populated Read more
Source§fn on_unlink_start(&self, operation: usize, _record: &PrefixRecord) -> usize
fn on_unlink_start(&self, operation: usize, _record: &PrefixRecord) -> usize
Called when an unlink operation started. Read more
Source§fn on_unlink_complete(&self, operation: usize)
fn on_unlink_complete(&self, operation: usize)
Called when an unlink operation completed. Read more
Source§fn on_link_start(&self, operation: usize, _record: &RepoDataRecord) -> usize
fn on_link_start(&self, operation: usize, _record: &RepoDataRecord) -> usize
Called when linking of a package has started Read more
Source§fn on_link_complete(&self, operation: usize)
fn on_link_complete(&self, operation: usize)
Called when linking of a package completed. Read more
Source§fn on_transaction_operation_complete(&self, _operation: usize)
fn on_transaction_operation_complete(&self, _operation: usize)
Called when a transaction operation finishes.
Source§fn on_transaction_complete(&self)
fn on_transaction_complete(&self)
Called when the transaction completes. Unless an error occurs, this is
the last function that is called.
Source§fn on_post_link_start(&self, package_name: &str, script_path: &str) -> usize
fn on_post_link_start(&self, package_name: &str, script_path: &str) -> usize
Called when a post-link script starts execution. Read more
Source§fn on_post_link_complete(&self, _index: usize, success: bool)
fn on_post_link_complete(&self, _index: usize, success: bool)
Called when a post-link script completes execution. Read more
Auto Trait Implementations§
impl<F> Freeze for IndicatifReporter<F>
impl<F> !RefUnwindSafe for IndicatifReporter<F>
impl<F> Send for IndicatifReporter<F>where
F: Send,
impl<F> Sync for IndicatifReporter<F>where
F: Send,
impl<F> Unpin for IndicatifReporter<F>
impl<F> !UnwindSafe for IndicatifReporter<F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.