(&mut self)
| 5615 | } |
| 5616 | |
| 5617 | fn snapshot(&mut self) -> std::result::Result<Snapshot, MigratableError> { |
| 5618 | let mut snapshot = Snapshot::from_data(SnapshotData::new_from_state(&self.state())?); |
| 5619 | |
| 5620 | // We aggregate all devices snapshots. |
| 5621 | for (_, device_node) in self.device_tree.lock().unwrap().iter() { |
| 5622 | if let Some(migratable) = &device_node.migratable { |
| 5623 | let mut migratable = migratable.lock().unwrap(); |
| 5624 | snapshot.add_snapshot(migratable.id(), migratable.snapshot()?); |
| 5625 | } |
| 5626 | } |
| 5627 | |
| 5628 | Ok(snapshot) |
| 5629 | } |
| 5630 | } |
| 5631 | |
| 5632 | impl Transportable for DeviceManager {} |
nothing calls this directly
no test coverage detected