Method
when
(&mut self, cond: CondFn, then: ExecFn)
Source from the content-addressed store, hash-verified
| 70 | } |
| 71 | |
| 72 | pub fn when(&mut self, cond: CondFn, then: ExecFn) -> &mut Self { |
| 73 | if self.compiled { |
| 74 | return self; |
| 75 | } |
| 76 | |
| 77 | self.target_times.push(0); |
| 78 | self.durations.push(0); |
| 79 | self.conditions.push(cond); |
| 80 | self.functions.push(then); |
| 81 | self.tail += 1; |
| 82 | return self; |
| 83 | } |
| 84 | |
| 85 | pub fn when_nano(&mut self, duration_nanos: uNano, then: ExecFn) -> &mut Self { |
| 86 | if self.compiled { |
Callers
nothing calls this directly
Tested by
no test coverage detected