Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 480 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 480 Bytes

nagios-range

This is a very small Rust library that simply parses a Nagios range as defined in the Nagios development guidelines.

Example

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));
}