pub struct DiffResult {
pub files: Vec<FileDiff>,
pub total_files: usize,
pub files_to_transfer: usize,
pub files_to_delete: usize,
pub conflicts: usize,
pub total_transfer_size: u64,
pub total_delete_size: u64,
pub estimated_duration_ms: u64,
pub calculation_time_ms: u64,
pub source_stats: DiffStats,
pub target_stats: DiffStats,
pub action_stats: HashMap<DiffAction, usize>,
}Expand description
差异结果集合
Fields§
§files: Vec<FileDiff>所有文件差异
total_files: usize总文件数
files_to_transfer: usize需要传输的文件数
files_to_delete: usize需要删除的文件数
conflicts: usize冲突文件数
total_transfer_size: u64总传输大小(字节)
total_delete_size: u64总删除大小(字节)
estimated_duration_ms: u64预计传输时间(毫秒)
calculation_time_ms: u64差异计算时间
source_stats: DiffStats来源统计
target_stats: DiffStats目标统计
action_stats: HashMap<DiffAction, usize>操作统计
Implementations§
Source§impl DiffResult
impl DiffResult
pub fn new() -> Self
pub fn add_file(&mut self, diff: FileDiff)
pub fn sort_by_priority(&mut self)
pub fn filter_by_action(&self, action: DiffAction) -> Vec<&FileDiff>
pub fn filter_by_tag(&self, tag: &str) -> Vec<&FileDiff>
pub fn find_by_path(&self, path: &str) -> Option<&FileDiff>
pub fn has_conflicts(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn summary(&self) -> String
pub fn to_json(&self) -> Result<String>
pub fn to_csv(&self) -> Result<String>
Trait Implementations§
Source§impl Clone for DiffResult
impl Clone for DiffResult
Source§fn clone(&self) -> DiffResult
fn clone(&self) -> DiffResult
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 DiffResult
impl Debug for DiffResult
Source§impl<'de> Deserialize<'de> for DiffResult
impl<'de> Deserialize<'de> for DiffResult
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
Auto Trait Implementations§
impl Freeze for DiffResult
impl RefUnwindSafe for DiffResult
impl Send for DiffResult
impl Sync for DiffResult
impl Unpin for DiffResult
impl UnwindSafe for DiffResult
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