1pub( crate ) mod private
3{
4 use crate::protected::*;
5
6 pub trait ChangerInterface
8 where
9 Self :
10 fmt::Debug +
11 Clone +
12 ,
13 {
14 type Root : ChangerInterface;
16 type Parent : ChangerInterface;
18
19 #[ inline ]
21 fn root( &mut self ) -> &mut Self::Root
22 {
23 unsafe
25 {
26 core::mem::transmute::< _, _ >( self.parent().root() )
27 }
28 }
29
30 fn context( self ) -> Self::Root;
32
33 fn parent( &mut self ) -> &mut Self::Parent;
35
36 fn end( self ) -> Self::Parent;
38
39 #[ inline ]
41 fn change_add< Change >( &mut self, change : Change ) -> &mut Self
42 where
43 Change : ChangeInterface + 'static,
44 {
45 self.root().change_add( change );
46 self
47 }
48
49 }
50
51}
52
53crate::mod_interface!
54{
55
56 prelude use ChangerInterface;
57
58}