musicxml/datatypes/xml_lang.rs
1use alloc::string::{String, ToString};
2use core::ops::Deref;
3use musicxml_internal::{DatatypeDeserializer, DatatypeSerializer};
4use musicxml_macros::{DatatypeDeserialize, DatatypeSerialize};
5
6/// See the definition in the [W3C Extensible Markup Language recommendation](https://www.w3.org/TR/xml/#sec-lang-tag).
7///
8/// Language names come from ISO 639, with optional country subcodes from ISO 3166.
9///
10/// The value of an instance of this type may be accessed by dereferencing the struct: `*datatype_val`.
11#[derive(Debug, PartialEq, Eq, DatatypeDeserialize, DatatypeSerialize)]
12pub struct XmlLang(pub String);
13
14impl Deref for XmlLang {
15 type Target = String;
16 fn deref(&self) -> &Self::Target {
17 &self.0
18 }
19}