Skip to main content

with_unicode_version

Function with_unicode_version 

Source
pub fn with_unicode_version<R>(
    version: UnicodeVersion,
    f: impl FnOnce() -> R,
) -> R
Expand description

Run f with the regex engine’s bundled Unicode snapshot temporarily set to version. Restores the previous value on return. Only affects pattern compilation; once compiled, an NFA’s classes are baked in.