MCPcopy Create free account
hub / github.com/corosync/corosync / new

Method new

bindings/rust/src/cpg.rs:88–98  ·  view source on GitHub ↗
(r: u32)

Source from the content-addressed store, hash-verified

86// Convert to cpg.h values
87impl Reason {
88 pub fn new(r: u32) -> Reason {
89 match r {
90 0 => Reason::Undefined,
91 1 => Reason::Join,
92 2 => Reason::Leave,
93 3 => Reason::NodeDown,
94 4 => Reason::NodeUp,
95 5 => Reason::ProcDown,
96 _ => Reason::Undefined,
97 }
98 }
99}
100impl fmt::Display for Reason {
101 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

Callers

nothing calls this directly

Calls 2

string_to_cpg_nameFunction · 0.85
cpg_iteration_initializeFunction · 0.85

Tested by

no test coverage detected