pub trait Progress {
// Provided methods
fn format(&mut self, _format: Option<InputFormat>) { ... }
fn input_read(&mut self, _done: u64, _total: u64) { ... }
fn is_cancelled(&self) -> bool { ... }
}Expand description
What a facade operation tells its caller while it runs, and how the
caller stops it. Every method has a default; NeverCancel uses them
all.
Provided Methods§
Sourcefn format(&mut self, _format: Option<InputFormat>)
fn format(&mut self, _format: Option<InputFormat>)
The input family, given in the options or detected from the leading
signature; None when the input is empty or unrecognized. Called once,
before the operation refuses the family or reads past the signature.
Sourcefn input_read(&mut self, _done: u64, _total: u64)
fn input_read(&mut self, _done: u64, _total: u64)
The furthest document byte read so far advanced to done of the
document’s total bytes. Format engines read their indexes first and
then page payloads in order, so this advances with the operation.
Sourcefn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether the caller asked to stop; checked between rows, pages and I/O
chunks. A cancelled operation fails with ErrorKind::Cancelled and
does not undo bytes already written.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Progress for NeverCancel
Reports nothing and never cancels.