An event queue for diffing.
| 692 | |
| 693 | /// An event queue for diffing. |
| 694 | pub trait EventQueue { |
| 695 | /// Push an event to the queue. |
| 696 | fn push(&mut self, data: NodeEventType); |
| 697 | |
| 698 | /// Push an event to the queue. |
| 699 | /// |
| 700 | /// This is a convenience method for constructing a [`NodeEventType`] |
| 701 | /// from param data and a path. |
| 702 | #[inline(always)] |
| 703 | fn push_param(&mut self, data: impl Into<ParamData>, path: PathBuilder) { |
| 704 | self.push(NodeEventType::Param { |
| 705 | data: data.into(), |
| 706 | path: path.build(), |
| 707 | }); |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | impl EventQueue for Vec<NodeEventType> { |
| 712 | fn push(&mut self, data: NodeEventType) { |