pub struct CountryIso3166Validator;Expand description
Validator for ISO3166 country codes.
§Examples
use ic_dbms_api::prelude::{CountryIso3166Validator, Validate, Value};
let validator = CountryIso3166Validator;
let valid_country = Value::Text("US".into());
let invalid_country = Value::Text("XX".into());
assert!(validator.validate(&valid_country).is_ok());
assert!(validator.validate(&invalid_country).is_err());Trait Implementations§
Auto Trait Implementations§
impl Freeze for CountryIso3166Validator
impl RefUnwindSafe for CountryIso3166Validator
impl Send for CountryIso3166Validator
impl Sync for CountryIso3166Validator
impl Unpin for CountryIso3166Validator
impl UnwindSafe for CountryIso3166Validator
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