1use crate::prelude::Commands;
2use uniplate::Uniplate;
3
4pub struct Update<T, M>
9where
10 T: Uniplate,
11{
12 pub(crate) new_subtree: T,
13 pub(crate) commands: Commands<T, M>,
14}
15
16impl<T, M> Update<T, M>
17where
18 T: Uniplate,
19{
20 pub(crate) fn new(new_subtree: T, commands: Commands<T, M>) -> Self {
21 Update {
22 new_subtree,
23 commands,
24 }
25 }
26
27 pub fn new_subtree(&self) -> &T {
29 &self.new_subtree
30 }
31
32 pub(crate) fn has_transform(&self) -> bool {
33 self.commands.has_transform()
34 }
35}