MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-cli/src/commands/clone/types.rs:107–115  ·  view source on GitHub ↗

Create a new progress tracker for the given number of changes. # Arguments `total_changes` - The total number of changes to download # Returns A new `CloneProgress` instance with all counters at zero. # Example ```rust use atomic::commands::clone::types::CloneProgress; let progress = CloneProgress::new(50); assert_eq!(progress.total_changes, 50); assert_eq!(progress.downloaded, 0); ```

(total_changes: usize)

Source from the content-addressed store, hash-verified

105 /// assert_eq!(progress.downloaded, 0);
106 /// ```
107 pub fn new(total_changes: usize) -> Self {
108 Self {
109 total_changes,
110 downloaded: 0,
111 applied: 0,
112 tags_downloaded: 0,
113 phase: ClonePhase::NotStarted,
114 }
115 }
116
117 /// Record a successfully downloaded change.
118 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected