MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / set

Function set

nodedb/src/fail_point.rs:40–45  ·  view source on GitHub ↗

Install an action for a named fail point. Subsequent `fail_point!(name)` invocations will fire the action.

(name: &str, action: FailAction)

Source from the content-addressed store, hash-verified

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) {

Callers 1

installMethod · 0.85

Calls 3

lockMethod · 0.80
to_stringMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected