Macro lazy_regex_proc_macros::bytes_lazy_regex

source ยท
bytes_lazy_regex!() { /* proc-macro */ }
Expand description

Return an instance of once_cell::sync::Lazy<bytes::Regex> that you can use in a public static declaration.

Example:

pub static GLOBAL_REX: Lazy<bytes::Regex> = bytes_lazy_regex!("^ab+$"i);

As for other macros, the regex is checked at compilation time.