musicxml/datatypes/
nmtoken.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 XML Schema standard](https://www.w3.org/TR/xmlschema-2/#NMTOKEN).
7///
8/// The value of an instance of this type may be accessed by dereferencing the struct: `*datatype_val`.
9#[derive(Debug, PartialEq, Eq, DatatypeDeserialize, DatatypeSerialize)]
10pub struct NmToken(pub String);
11
12impl Deref for NmToken {
13  type Target = String;
14  fn deref(&self) -> &Self::Target {
15    &self.0
16  }
17}