Inject an error that will be returned by the next `apply_*` call.
(&self, err: ArrayError)
| 210 | |
| 211 | /// Inject an error that will be returned by the next `apply_*` call. |
| 212 | pub fn set_reject_next(&self, err: ArrayError) { |
| 213 | *self |
| 214 | .reject_next_with |
| 215 | .lock() |
| 216 | .expect("invariant: MockEngine mutex is not poisoned") = Some(err); |
| 217 | } |
| 218 | |
| 219 | fn take_inject(&self) -> Option<ArrayError> { |
| 220 | self.reject_next_with |