pub struct ProgressEvent<'a> {
pub stage: &'a str,
pub current: usize,
pub total: usize,
pub detail: Option<&'a str>,
}Expand description
Single progress update emitted during an analysis run. Surfaced via
analyze_with_progress so long-running invocations (typically
--rust-analyzer or --semver-checks) can give the caller a live
signal instead of a 30-second silence.
Stages are a small fixed vocabulary so consumers can map them to UI strings or progress bars without scraping free text:
"symbols"— collecting top-level items from changed files.current/totalcount files processed."analyzers"— running the per-file/per-symbol analyzers.totalis the number of analyzer passes;currentis how many have completed."semver_checks"— invokingcargo-semver-checks. Only emitted when the flag is on;current/totalare both 1 (start/done)."rust_analyzer"— driving the RA LSP subprocess. Only emitted when the flag is on;current/totalare both 1."done"— final emit, always sent at the end of a successful run.current == total.
Fields§
§stage: &'a str§current: usize§total: usize§detail: Option<&'a str>Trait Implementations§
Source§impl<'a> Clone for ProgressEvent<'a>
impl<'a> Clone for ProgressEvent<'a>
Source§fn clone(&self) -> ProgressEvent<'a>
fn clone(&self) -> ProgressEvent<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ProgressEvent<'a>
impl<'a> RefUnwindSafe for ProgressEvent<'a>
impl<'a> Send for ProgressEvent<'a>
impl<'a> Sync for ProgressEvent<'a>
impl<'a> Unpin for ProgressEvent<'a>
impl<'a> UnsafeUnpin for ProgressEvent<'a>
impl<'a> UnwindSafe for ProgressEvent<'a>
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