(&mut self, mut plot: Plot)
| 476 | } |
| 477 | |
| 478 | pub fn add(&mut self, mut plot: Plot) { |
| 479 | // generate a new id |
| 480 | use rand::Rng; |
| 481 | let mut rng = rand::thread_rng(); |
| 482 | let id = rng.gen(); |
| 483 | plot.id = id; |
| 484 | self.plots.insert(id, plot); |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | /// Contains all relevant information to both the look of the canvas and the data to be plotted. |
no test coverage detected