Read the prev value of the node state using the given accumulator. Returns a default value if the value is not present.
(
&self,
agg_r: &AccId<A, IN, OUT, ACC>,
)
| 204 | /// Read the prev value of the node state using the given accumulator. |
| 205 | /// Returns a default value if the value is not present. |
| 206 | pub fn read_prev<A, IN, OUT, ACC: Accumulator<A, IN, OUT>>( |
| 207 | &self, |
| 208 | agg_r: &AccId<A, IN, OUT, ACC>, |
| 209 | ) -> OUT |
| 210 | where |
| 211 | A: StateType, |
| 212 | OUT: std::fmt::Debug, |
| 213 | { |
| 214 | self.node_state() |
| 215 | .shard() |
| 216 | .read_with_pid(self.eval_graph.ss + 1, self.state_pos, agg_r) |
| 217 | .unwrap_or(ACC::finish(&ACC::zero())) |
| 218 | } |
| 219 | |
| 220 | pub fn read_global_state_prev<A, IN, OUT, ACC: Accumulator<A, IN, OUT>>( |
| 221 | &self, |
nothing calls this directly
no test coverage detected