pub struct RegionCriterion {
pub meta: Bo4eMeta,
pub validity_type: Option<ValidityType>,
pub criterion_type: Option<RegionCriterionType>,
pub value: Option<String>,
}Expand description
Component for modeling a regional criterion.
Used to define criteria for regional delimitation, such as postal codes, federal states, or network areas.
German: Regionskriterium
§Example
use bo4e_core::com::RegionCriterion;
use bo4e_core::enums::{RegionCriterionType, ValidityType};
let criterion = RegionCriterion {
validity_type: Some(ValidityType::OnlyIn),
criterion_type: Some(RegionCriterionType::PostalCode),
value: Some("50667".to_string()),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
validity_type: Option<ValidityType>Whether this is an inclusive or exclusive criterion (Gueltigkeitstyp)
criterion_type: Option<RegionCriterionType>The type of criterion, e.g., federal state, postal code (Regionskriteriumtyp)
value: Option<String>The value the criterion takes, e.g., “NRW” or “50667” (Wert) Note: For BUNDESWEIT (nationwide), this value is not relevant.
Trait Implementations§
Source§impl Bo4eObject for RegionCriterion
impl Bo4eObject for RegionCriterion
Source§fn type_name_german() -> &'static str
fn type_name_german() -> &'static str
Returns the German type name as used in the
_typ field. Read moreSource§fn type_name_english() -> &'static str
fn type_name_english() -> &'static str
Returns the English type name. Read more
Source§impl Clone for RegionCriterion
impl Clone for RegionCriterion
Source§fn clone(&self) -> RegionCriterion
fn clone(&self) -> RegionCriterion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegionCriterion
impl Debug for RegionCriterion
Source§impl Default for RegionCriterion
impl Default for RegionCriterion
Source§fn default() -> RegionCriterion
fn default() -> RegionCriterion
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RegionCriterion
impl<'de> Deserialize<'de> for RegionCriterion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RegionCriterion
impl PartialEq for RegionCriterion
Source§impl Serialize for RegionCriterion
impl Serialize for RegionCriterion
impl StructuralPartialEq for RegionCriterion
Auto Trait Implementations§
impl Freeze for RegionCriterion
impl RefUnwindSafe for RegionCriterion
impl Send for RegionCriterion
impl Sync for RegionCriterion
impl Unpin for RegionCriterion
impl UnsafeUnpin for RegionCriterion
impl UnwindSafe for RegionCriterion
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