sdmx_json/structure/
traits.rs1use crate::primitives::{Annotation, Link, LocalizedText};
2use crate::structure::{CommonArtefactType, Item};
3
4pub trait Artefact {
6 fn artefact(&self) -> &CommonArtefactType;
7 fn id(&self) -> &String;
8 fn agency_id(&self) -> Option<&String>;
9 fn version(&self) -> Option<&String>;
10 fn name(&self) -> Option<&String>;
11 fn names(&self) -> Option<&LocalizedText>;
12 fn valid_from(&self) -> Option<&String>;
13 fn valid_to(&self) -> Option<&String>;
14 fn is_external_reference(&self) -> Option<bool>;
15 fn annotations(&self) -> Option<&Vec<Annotation>>;
16 fn links(&self) -> Option<&Vec<Link>>;
17}
18
19pub trait ItemScheme {
23 fn is_partial(&self) -> Option<bool>;
24 fn items(&self) -> Option<&Vec<Item>>;
25 fn set_items(&mut self, items: Option<Vec<Item>>);
26 fn clear_items(&mut self);
27 fn contains_items(&self) -> bool;
28}