pub struct SyncProgress {
pub total: u32,
pub completed: u32,
pub current_item: Option<String>,
pub bytes_transferred: u64,
pub bytes_total: u64,
}Expand description
Progress information for an ongoing sync operation.
Fields§
§total: u32Total items to sync.
completed: u32Items completed.
current_item: Option<String>Current item being synced (if any).
bytes_transferred: u64Bytes transferred (for file transfers).
bytes_total: u64Total bytes to transfer.
Implementations§
Source§impl SyncProgress
impl SyncProgress
Sourcepub fn percentage(&self) -> u8
pub fn percentage(&self) -> u8
Calculate progress as a percentage (0-100).
Sourcepub fn bytes_percentage(&self) -> u8
pub fn bytes_percentage(&self) -> u8
Calculate byte progress as a percentage (0-100).
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true if sync is complete.
Trait Implementations§
Source§impl Clone for SyncProgress
impl Clone for SyncProgress
Source§fn clone(&self) -> SyncProgress
fn clone(&self) -> SyncProgress
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 moreSource§impl Debug for SyncProgress
impl Debug for SyncProgress
Source§impl Default for SyncProgress
impl Default for SyncProgress
Source§fn default() -> SyncProgress
fn default() -> SyncProgress
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SyncProgress
impl<'de> Deserialize<'de> for SyncProgress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SyncProgress
impl PartialEq for SyncProgress
Source§impl Serialize for SyncProgress
impl Serialize for SyncProgress
impl Eq for SyncProgress
impl StructuralPartialEq for SyncProgress
Auto Trait Implementations§
impl Freeze for SyncProgress
impl RefUnwindSafe for SyncProgress
impl Send for SyncProgress
impl Sync for SyncProgress
impl Unpin for SyncProgress
impl UnsafeUnpin for SyncProgress
impl UnwindSafe for SyncProgress
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