1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//! # MIDDS v2 - Music Industry Data Description Standard
//!
//! This crate provides comprehensive data structures for representing music industry metadata
//! in a blockchain-compatible format. MIDDS v2 includes structures for musical works, tracks,
//! releases, and associated metadata.
//!
//! ## Core Types
//!
//! - [`MusicalWork`](musical_work::MusicalWork) - Represents compositions and songwriting metadata
//! - [`Recording`](recording::Recording) - Represents recordings and performance metadata
//! - [`Release`](release::Release) - Represents albums, EPs, singles and distribution metadata
//!
//! ## Key Features
//!
//! - **Substrate Compatible**: All types implement necessary traits for blockchain storage
//! - **Validation-Free**: No runtime validation, designed for application-level validation
//! - **Industry Standards**: Uses ISWC, ISRC, EAN/UPC and other industry identifiers
//! - **Comprehensive Metadata**: Supports extensive metadata for all music industry use cases
//!
//! ## Example Usage
//!
//! ```rust
//! use allfeat_midds_v2::{
//! musical_work::{MusicalWork, Creator, CreatorRole},
//! shared::{PartyId, Key, Language},
//! };
//!
//! // Create a musical work
//! let work = MusicalWork {
//! iswc: b"T1234567890".to_vec().try_into().unwrap(),
//! title: b"Example Song".to_vec().try_into().unwrap(),
//! creation_year: Some(2024),
//! instrumental: Some(false),
//! language: Some(Language::English),
//! bpm: Some(120),
//! key: Some(Key::C),
//! work_type: None,
//! creators: vec![Creator {
//! id: PartyId::Ipi(123456789),
//! role: CreatorRole::Composer,
//! }].try_into().unwrap(),
//! classical_info: None,
//! };
//! ```
use ;
/// Unique identifier type used across all MIDDS entities.
///
/// This type represents a unique 64-bit identifier that can be used to reference
/// musical works, tracks, releases, or parties within the MIDDS ecosystem.
///
/// # Example
///
/// ```rust
/// use allfeat_midds_v2::MiddsId;
///
/// let work_id: MiddsId = 12345;
/// let recording_id: MiddsId = 67890;
/// ```
pub type MiddsId = u64;
/// Bounded string type used throughout MIDDS for text fields.
///
/// This type provides a space-efficient, bounded string representation that is compatible
/// with Substrate's storage requirements. The generic parameter `S` defines the maximum
/// length in bytes.
///
/// # Example
///
/// ```rust
/// use allfeat_midds_v2::MiddsString;
///
/// // Create a bounded string with max 256 bytes
/// let title: MiddsString<256> = b"My Song Title".to_vec().try_into().unwrap();
/// assert_eq!(title.len(), 13);
/// ```
pub type MiddsString<const S: u32> = ;
/// Bounded vector type used throughout MIDDS for collections.
///
/// This type provides a space-efficient, bounded collection that is compatible
/// with Substrate's storage requirements. The generic parameter `S` defines the maximum
/// number of elements.
///
/// # Example
///
/// ```rust
/// use allfeat_midds_v2::{MiddsVec, MiddsId};
///
/// // Create a bounded vector of recording IDs with max 10 elements
/// let recording_ids: MiddsVec<MiddsId, 10> = vec![1, 2, 3].try_into().unwrap();
/// assert_eq!(recording_ids.len(), 3);
/// ```
pub type MiddsVec<T, const S: u32> = ;
/// Shared utility types and common enumerations.
///
/// Contains common types used across all MIDDS structures including dates,
/// countries, languages, and musical keys.