pub trait FileDownloadListener: Send + Sync
// Required methods
fn on_multi_part_download_complete(&self, results: Vec<OperationResult>);
fn on_part_download(&self, result: OperationResult);
fn on_full_file_download(&self, file_names: Vec<String>);
Listener trait for file download progress callbacks.
Implement this trait to receive notifications about download progress, including per-part completion for multi-part downloads.
Example
Required Methods
fn on_multi_part_download_complete(&self, results: Vec<OperationResult>)
Called when all parts of a multi-part download have been completed.
results- List of results for each part of the download
fn on_part_download(&self, result: OperationResult)
Called whenever a single part of a multi-part download has been completed.
This is useful for tracking progress during large file downloads.
result- Result of the part download
fn on_full_file_download(&self, file_names: Vec<String>)
Called once per batch of whole files fetched in one request, with the KiFS names of those saved, when at least one was. A file skipped because it already existed locally and overwriting is off counts as saved.
file_names- The KiFS names of the files saved
Dyn Compatibility
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called “object safety”.