pub fn value_kind_of(name: &str) -> Option<ValueKind>Expand description
What kind of value a unique name takes, and nothing for a name outside the vocabulary – which music21 keeps as a text, there being nothing to say otherwise.
use music21::metadata::{ValueKind, value_kind_of};
assert_eq!(value_kind_of("title"), Some(ValueKind::Text));
assert_eq!(value_kind_of("composer"), Some(ValueKind::Contributor));
assert_eq!(value_kind_of("dateCreated"), Some(ValueKind::Date));
assert_eq!(value_kind_of("copyright"), Some(ValueKind::Copyright));
assert_eq!(value_kind_of("average duration"), None);