(&mut self)
| 337 | } |
| 338 | |
| 339 | fn snapshot(&mut self) -> Box<dyn std::any::Any> { |
| 340 | let cursors: Vec<_> = self.streams.iter().map(|(k, v)| (*k, v.cursor)).collect(); |
| 341 | let tracer = self.tracer.as_ref().map(|x| x.snapshot()); |
| 342 | Box::new(MultiStreamSnapshot { cursors, tracer }) |
| 343 | } |
| 344 | |
| 345 | fn restore(&mut self, snapshot: &Box<dyn std::any::Any>) { |
| 346 | let snapshot = snapshot.downcast_ref::<MultiStreamSnapshot>().unwrap(); |
no outgoing calls