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>)
| 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 | /// |