rskit-storage 0.2.0-alpha.2

File I/O, local storage, temp files, MIME detection, and storage backend traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::sync::Arc;

/// Upload progress report.
pub struct UploadProgress {
    /// Bytes sent so far.
    pub bytes_sent: u64,
    /// Total bytes to send (if known).
    pub total_bytes: Option<u64>,
    /// Completion percentage (if total is known).
    pub percent: Option<f32>,
}

/// Callback for receiving upload progress updates.
pub type ProgressCallback = Arc<dyn Fn(UploadProgress) + Send + Sync>;