pub struct ProgressReporter { /* private fields */ }Expand description
Progress reporting system for async operations
Implementations§
Source§impl ProgressReporter
impl ProgressReporter
Sourcepub fn for_operation(operation_name: &str) -> Self
pub fn for_operation(operation_name: &str) -> Self
Create a progress reporter for a specific operation
Sourcepub fn start_operation(&self, operation_name: &str)
pub fn start_operation(&self, operation_name: &str)
Start a new operation
Sourcepub fn start_step(&self, step_name: &str, step_number: usize)
pub fn start_step(&self, step_name: &str, step_number: usize)
Start a new step
Sourcepub fn update_step_progress(&self, progress: f64, message: &str)
pub fn update_step_progress(&self, progress: f64, message: &str)
Update step progress
Sourcepub fn update_data_progress(&self, bytes_processed: u64, total_bytes: u64)
pub fn update_data_progress(&self, bytes_processed: u64, total_bytes: u64)
Update data processing progress
Sourcepub fn update_item_progress(&self, item: &str, current: usize, total: usize)
pub fn update_item_progress(&self, item: &str, current: usize, total: usize)
Update item processing progress
Sourcepub fn complete_step(&self, step_name: &str)
pub fn complete_step(&self, step_name: &str)
Complete current step
Sourcepub fn report_error(&self, message: &str, step: &str)
pub fn report_error(&self, message: &str, step: &str)
Report error
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if operation is cancelled
Sourcepub fn get_state(&self) -> ProgressState
pub fn get_state(&self) -> ProgressState
Get current progress state
Sourcepub fn set_total_steps(&self, total: usize)
pub fn set_total_steps(&self, total: usize)
Set total number of steps
Sourcepub fn set_estimated_duration(&self, duration: Duration)
pub fn set_estimated_duration(&self, duration: Duration)
Set estimated duration
Sourcepub fn subscribe(&self) -> Receiver<ProgressEvent>
pub fn subscribe(&self) -> Receiver<ProgressEvent>
Subscribe to progress events
Trait Implementations§
Source§impl Clone for ProgressReporter
impl Clone for ProgressReporter
Source§fn clone(&self) -> ProgressReporter
fn clone(&self) -> ProgressReporter
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 !RefUnwindSafe for ProgressReporter
impl !UnwindSafe for ProgressReporter
impl Freeze for ProgressReporter
impl Send for ProgressReporter
impl Sync for ProgressReporter
impl Unpin for ProgressReporter
impl UnsafeUnpin for ProgressReporter
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> EvidenceKind for T
impl<T> EvidenceKind for T
default fn kind_label(&self) -> &'static str
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request