Add a sub-component's Snapshot to the Snapshot.
(&mut self, id: String, snapshot: Snapshot)
| 184 | |
| 185 | /// Add a sub-component's Snapshot to the Snapshot. |
| 186 | pub fn add_snapshot(&mut self, id: String, snapshot: Snapshot) { |
| 187 | self.snapshots.insert(id, snapshot); |
| 188 | } |
| 189 | |
| 190 | /// Generate the state data from the snapshot |
| 191 | pub fn to_state<'a, T>(&'a self) -> Result<T, MigratableError> |