1- Derives ` [openmina_core ::ActionEvent] ` trait implementation for action.
1+ Derives ` [mina_core ::ActionEvent] ` trait implementation for action.
22
33### Action containers
44
55For action containers, it simply delegates to inner actions.
66
77``` rust
8- # use openmina_core :: ActionEvent ;
8+ # use mina_core :: ActionEvent ;
99#
1010#[derive(ActionEvent )]
1111enum ActionContainer {
@@ -36,8 +36,8 @@ impl ActionEvent for Action1 {
3636 where T : ActionContext
3737 {
3838 match self {
39- Action1 :: Init => openmina_core :: action_debug! (context ),
40- Action1 :: Done => openmina_core :: action_debug! (context ),
39+ Action1 :: Init => mina_core :: action_debug! (context ),
40+ Action1 :: Done => mina_core :: action_debug! (context ),
4141 }
4242 }
4343}
@@ -50,7 +50,7 @@ overriden by using `#[action_event(level = ...)]` attribute. Also, actions that
5050names ends with ` Error ` or ` Warn ` will be traced with ` warn ` level.
5151
5252``` rust
53- #[derive(openmina_core :: ActionEvent )]
53+ #[derive(mina_core :: ActionEvent )]
5454#[action_event(level = trace)]
5555pub enum Action {
5656 ActionDefaultLevel ,
@@ -62,17 +62,17 @@ pub enum Action {
6262```
6363
6464``` rust
65- impl openmina_core :: ActionEvent for Action {
65+ impl mina_core :: ActionEvent for Action {
6666 fn action_event <T >(& self , context : & T )
6767 where
68- T : openmina_core :: log :: EventContext ,
68+ T : mina_core :: log :: EventContext ,
6969 {
7070 #[allow(unused_variables)]
7171 match self {
72- Action :: ActionDefaultLevel => openmina_core :: action_trace! (context ),
73- Action :: ActionOverrideLevel => openmina_core :: action_warn! (context ),
74- Action :: ActionWithError => openmina_core :: action_warn! (context ),
75- Action :: ActionWithWarn => openmina_core :: action_warn! (context ),
72+ Action :: ActionDefaultLevel => mina_core :: action_trace! (context ),
73+ Action :: ActionOverrideLevel => mina_core :: action_warn! (context ),
74+ Action :: ActionWithError => mina_core :: action_warn! (context ),
75+ Action :: ActionWithWarn => mina_core :: action_warn! (context ),
7676 }
7777 }
7878}
@@ -84,7 +84,7 @@ If an action has doc-comment, its first line will be used for `summary` field of
8484tracing events for the action.
8585
8686``` rust
87- #[derive(openmina_core :: ActionEvent )]
87+ #[derive(mina_core :: ActionEvent )]
8888pub enum Action {
8989 Unit ,
9090 /// documentation
@@ -98,15 +98,15 @@ pub enum Action {
9898```
9999
100100``` rust
101- impl openmina_core :: ActionEvent for Action {
101+ impl mina_core :: ActionEvent for Action {
102102 fn action_event <T >(& self , context : & T )
103103 where
104- T : openmina_core :: log :: EventContext ,
104+ T : mina_core :: log :: EventContext ,
105105 {
106106 match self {
107- Action :: Unit => openmina_core :: action_debug! (context ),
108- Action :: UnitWithDoc => openmina_core :: action_debug! (context , summary = " documentation" ),
109- Action :: UnitWithMultilineDoc => openmina_core :: action_debug! (context , summary = " Multiline documentation" ),
107+ Action :: Unit => mina_core :: action_debug! (context ),
108+ Action :: UnitWithDoc => mina_core :: action_debug! (context , summary = " documentation" ),
109+ Action :: UnitWithMultilineDoc => mina_core :: action_debug! (context , summary = " Multiline documentation" ),
110110 }
111111 }
112112}
@@ -118,7 +118,7 @@ Certain fields can be added to the tracing event, using
118118` #[action_event(fields(...))] ` attribute.
119119
120120``` rust
121- #[derive(openmina_core :: ActionEvent )]
121+ #[derive(mina_core :: ActionEvent )]
122122pub enum Action {
123123 NoFields { f1 : bool },
124124 #[action_event(fields(f1))]
@@ -133,17 +133,17 @@ pub enum Action {
133133```
134134
135135``` rust
136- impl openmina_core :: ActionEvent for Action {
136+ impl mina_core :: ActionEvent for Action {
137137 fn action_event <T >(& self , context : & T )
138138 where
139- T : openmina_core :: log :: EventContext ,
139+ T : mina_core :: log :: EventContext ,
140140 {
141141 match self {
142- Action :: NoFields { f1 } => openmina_core :: action_debug! (context ),
143- Action :: Field { f1 } => openmina_core :: action_debug! (context , f1 = f1 ),
144- Action :: FieldWithName { f1 } => openmina_core :: action_debug! (context , f = f1 ),
145- Action :: DebugField { f1 } => openmina_core :: action_debug! (context , f1 = debug (f1 )),
146- Action :: DisplayField { f1 } => openmina_core :: action_debug! (context , f1 = display (f1 )),
142+ Action :: NoFields { f1 } => mina_core :: action_debug! (context ),
143+ Action :: Field { f1 } => mina_core :: action_debug! (context , f1 = f1 ),
144+ Action :: FieldWithName { f1 } => mina_core :: action_debug! (context , f = f1 ),
145+ Action :: DebugField { f1 } => mina_core :: action_debug! (context , f1 = debug (f1 )),
146+ Action :: DisplayField { f1 } => mina_core :: action_debug! (context , f1 = display (f1 )),
147147 }
148148 }
149149}
@@ -156,7 +156,7 @@ a field's enum variant), logging can be delegated to a function implementing
156156that logic.
157157
158158``` rust
159- #[derive(openmina_core :: ActionEvent )]
159+ #[derive(mina_core :: ActionEvent )]
160160pub enum Action {
161161 #[action_event(expr(foo(context)))]
162162 Unit ,
@@ -166,10 +166,10 @@ pub enum Action {
166166```
167167
168168``` rust
169- impl openmina_core :: ActionEvent for Action {
169+ impl mina_core :: ActionEvent for Action {
170170 fn action_event <T >(& self , context : & T )
171171 where
172- T : openmina_core :: log :: EventContext ,
172+ T : mina_core :: log :: EventContext ,
173173 {
174174 #[allow(unused_variables)]
175175 match self {
0 commit comments