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

Method into_pull_delta

atomic-remote/src/sync.rs:332–341  ·  view source on GitHub ↗

Convert this delta into a `PullDelta`. The pull delta contains: - `to_download`: Changes we need to fetch from the remote - `remote_state`: The remote's current state - `local_only`: Changes we have that the remote doesn't (informational)

(self, remote_state: Option<StateResponse>)

Source from the content-addressed store, hash-verified

330 /// - `remote_state`: The remote's current state
331 /// - `local_only`: Changes we have that the remote doesn't (informational)
332 pub fn into_pull_delta(self, remote_state: Option<StateResponse>) -> PullDelta {
333 let mut delta = PullDelta::new();
334 delta.to_download = self
335 .to_download
336 .into_iter()
337 .map(|n| crate::types::Node::change(&n.hash, &n.state))
338 .collect();
339 delta.remote_state = remote_state;
340 delta
341 }
342
343 /// Convert this delta into a `PushDelta`.
344 ///

Callers 2

compute_pull_deltaMethod · 0.80

Calls 1

into_iterMethod · 0.45

Tested by 1