Function iso3166_1::num_range
[−]
[src]
pub fn num_range<'a>(
from: Option<&str>,
to: Option<&str>
) -> Vec<CountryCode<'a>>
Returns a Vec
of CountryCode
s that have a numeric value within the range
of the from
and to
given. The from and to are optional, and can either
be None
or Some(&str)
for variations of the range wanted.
Examples
Getting all values between 100
and 300
:
let countries = iso3166_1::num_range(Some("100"), Some("300"));
Getting all values from 400
and beyond:
let countries = iso3166_1::num_range(Some("400"), None);
Getting all values up to 500
:
let countries = iso3166_1::num_range(None, Some("500"));
Getting no values, if that's your thing:
let countries = iso3166_1::num_range(None, None);