pub trait MuninNodePlugin {
// Required methods
fn config(&self);
fn run(&self);
// Provided methods
fn check_autoconf(&self) -> bool { ... }
fn autoconf(&self) { ... }
fn get_env_threshold(level: Level, field: &str) -> Option<String> { ... }
fn get_env_threshold_as<T>(level: Level, field: &str) -> Option<T>
where T: FromStr { ... }
fn print_if_env(level: Level, field: &str) { ... }
fn start(&self) -> i32 { ... }
}Required Methods§
Provided Methods§
fn check_autoconf(&self) -> bool
fn autoconf(&self)
fn get_env_threshold(level: Level, field: &str) -> Option<String>
fn get_env_threshold_as<T>(level: Level, field: &str) -> Option<T>where
T: FromStr,
Sourcefn print_if_env(level: Level, field: &str)
fn print_if_env(level: Level, field: &str)
Examples found in repository?
examples/load.rs (line 33)
24 fn config(&self) {
25 println!(r#"graph_title Load average
26graph_args --base 1000 -l 0
27graph_vlabel load
28graph_scale no
29graph_category system
30graph_info Load average (written in Rust)
31{0}.label load
32{0}.info 5 minutes average"#, FIELD);
33 Self::print_if_env(Level::Warning, FIELD);
34 Self::print_if_env(Level::Critical, FIELD);
35 }Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.