pub struct StreamingProgress {
pub releases_written: usize,
pub resources_written: usize,
pub bytes_written: usize,
pub current_memory_usage: usize,
pub estimated_completion_percent: Option<f64>,
}Expand description
Progress information for streaming operations
Provides real-time progress updates during streaming DDEX XML generation. Used by progress callbacks to monitor the build process and estimate completion.
§Example
use ddex_builder::streaming::{StreamingBuilder, StreamingProgress};
let mut builder = StreamingBuilder::new(output_writer)?;
builder.set_progress_callback(Box::new(|progress: StreamingProgress| {
println!("Progress: {}/{} items, {} MB written",
progress.releases_written + progress.resources_written,
progress.estimated_completion_percent.unwrap_or(0.0),
progress.bytes_written / 1024 / 1024);
}));Fields§
§releases_written: usizeNumber of releases written to the stream so far
resources_written: usizeNumber of resources (tracks/recordings) written to the stream so far
bytes_written: usizeTotal bytes written to the output stream so far
current_memory_usage: usizeCurrent memory usage in bytes (includes buffers)
estimated_completion_percent: Option<f64>Estimated completion percentage (0.0-100.0) if total items was set
Trait Implementations§
Source§impl Clone for StreamingProgress
impl Clone for StreamingProgress
Source§fn clone(&self) -> StreamingProgress
fn clone(&self) -> StreamingProgress
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for StreamingProgress
impl RefUnwindSafe for StreamingProgress
impl Send for StreamingProgress
impl Sync for StreamingProgress
impl Unpin for StreamingProgress
impl UnwindSafe for StreamingProgress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more