Install an action for a named fail point. Subsequent `fail_point!(name)` invocations will fire the action.
(name: &str, action: FailAction)
| 38 | /// Install an action for a named fail point. Subsequent |
| 39 | /// `fail_point!(name)` invocations will fire the action. |
| 40 | pub fn set(name: &str, action: FailAction) { |
| 41 | REGISTRY |
| 42 | .lock() |
| 43 | .unwrap_or_else(|p| p.into_inner()) |
| 44 | .insert(name.to_string(), action); |
| 45 | } |
| 46 | |
| 47 | /// Remove any installed action for the named fail point. |
| 48 | pub fn clear(name: &str) { |