oid

Macro oid 

Source
macro_rules! oid {
    ($s:literal) => { ... };
}
Expand description

Helper macro to create a &'static Oid from a string literal. The string literal must conform to the standard OID format and must be a valid OID (first arc must be <= 2), but also accepts OIDs with and without a leading ..

Usage:

const SYS_DESCR: &'static rasn::types::Oid = rasn::oid!(".1.3.6.1.2.1.1.1.0");
assert_eq!(SYS_DESCR, rasn::types::Oid::new(&[1, 3, 6, 1, 2, 1, 1, 1, 0]).unwrap());