pub struct CountryGate {
pub whitelist_countries: Vec<String>,
pub blocked_countries: Vec<String>,
}Expand description
The country gate: the parsed whitelist_countries and
blocked_countries sets.
Build it with parse_country_lists (which uppercases and dedups the
codes, the reference _validate_country_set_value coercion). The
default has no rules: check_countries passes everything.
Fields§
§whitelist_countries: Vec<String>whitelist_countries: restrictive when non-empty (an unresolved or
unlisted country is blocked).
blocked_countries: Vec<String>blocked_countries: always blocked, consulted when the whitelist is
empty.
Implementations§
Trait Implementations§
Source§impl Clone for CountryGate
impl Clone for CountryGate
Source§impl Debug for CountryGate
impl Debug for CountryGate
Source§impl Default for CountryGate
impl Default for CountryGate
impl Eq for CountryGate
Source§impl PartialEq for CountryGate
impl PartialEq for CountryGate
impl StructuralPartialEq for CountryGate
Auto Trait Implementations§
impl Freeze for CountryGate
impl RefUnwindSafe for CountryGate
impl Send for CountryGate
impl Sync for CountryGate
impl Unpin for CountryGate
impl UnsafeUnpin for CountryGate
impl UnwindSafe for CountryGate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.