Struct conserve::report::Report

source ·
pub struct Report { /* private fields */ }
Expand description

A Report is notified of problems or non-problematic events that occur while Conserve is running.

A Report holds counters, identified by a name. The name must be in KNOWN_COUNTERS.

A Report is internally mutable, so a single instance can be shared by multiple objects or scopes (on the same thread) who all append to it.

Cloning a Report makes a shared reference to the same underlying counters.

Implementations§

Default constructor with plain text UI.

Make a new report viewed by a given UI.

Borrow (read-only) counters inside this report.

Increment a counter by a given amount.

The name must be a static string. Counters implicitly start at 0.

Merge the contents of from_report into self.

source

pub fn start_entry(&self, entry: &dyn Entry)

Report that processing started for a given entry.

Briefly describe the phase of work.

Report that a problem occurred.

Later this might also count or summarize them.

Set the total expected work (in bytes); this also resets the amount of work done.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Adds separators according to the given SeparatorPolicy. Read more
Inserts a comma every three digits from the right. Read more
Inserts a space every three digits from the right. Read more
Inserts a period every three digits from the right. Read more
Inserts an underscore every three digits from the right. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.