Skip to main content

is_in_range

Function is_in_range 

Source
pub fn is_in_range(
    version: &NginxVersion,
    min: Option<&NginxVersion>,
    max: Option<&NginxVersion>,
) -> bool
Expand description

Returns true when version falls within the optional inclusive bounds.

A None bound means “unbounded” on that side.

§Panics

In debug builds, panics if both bounds are supplied and min > max (i.e. the range is empty). A reversed range is almost always a plugin author mistake; failing fast in tests catches the bug at the source rather than silently filtering every rule out at runtime.