1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
pub struct Declaration { pub version_info: VersionInfo, pub encoding_decl: Option<String>, pub sd_decl: Option<bool>, } #[derive(Clone, Copy)] pub enum VersionInfo { One, OneDotOne, } impl Declaration { pub fn version(version: VersionInfo) -> Self { Self { version_info: version, encoding_decl: None, sd_decl: None, } } }