Crates.io | nagios-range |
lib.rs | nagios-range |
version | 0.2.5 |
source | src |
created_at | 2022-01-07 15:00:28.763594 |
updated_at | 2022-02-26 14:05:59.12904 |
description | Provides types to parse and operate on Nagios ranges |
homepage | |
repository | https://github.com/puetzp/nagios-range |
max_upload_size | |
id | 509558 |
size | 19,189 |
This is a very small Rust library that simply parses a Nagios range as defined in the Nagios development guidelines.
use nagios_range::{NagiosRange, Error};
fn main() -> Result<(), Error>{
let range = NagiosRange::from("@~:10");
assert!(range.is_ok());
assert!(range?.checks_inside());
assert!(range?.start_is_infinite());
assert!(range?.check(5.0));
}