61 lines
1.5 KiB
Text
61 lines
1.5 KiB
Text
@startuml Class Diagram
|
|
|
|
package core {
|
|
package str {
|
|
package traits {
|
|
interface FromStr<type Error> {
|
|
from_str(s: &str): Result<Self, Self::Error>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
package cli {
|
|
package docstr {}
|
|
package schema {
|
|
+enum Cli {
|
|
+Play { PlayOpts }
|
|
+Export { ExportOptions }
|
|
+List { ListOptions }
|
|
}
|
|
+struct PlayOptions {
|
|
#input: FileContents
|
|
}
|
|
+struct ExportOptions {
|
|
~input: FileContents
|
|
~output: AudioFileName
|
|
}
|
|
+enum ListOptions {
|
|
+Extensions
|
|
+struct Math { -kind: Option<MathDocKind> }
|
|
+Glyphs
|
|
}
|
|
+enum MathDocKind {
|
|
+Functions
|
|
+Operators
|
|
+Literals
|
|
}
|
|
+struct FileContents {
|
|
0: String
|
|
}
|
|
FileContents --|> FromStr: type Error = io::Error
|
|
+struct AudioFileName {
|
|
0: String
|
|
}
|
|
+struct UnsupportedFileExtensionError {
|
|
}
|
|
AudioFileName -|> FromStr: type Error = UnsupportedFileExtensionError
|
|
Cli --> PlayOptions
|
|
Cli --> ExportOptions
|
|
Cli --> ListOptions
|
|
PlayOptions --> FileContents
|
|
ExportOptions -> FileContents
|
|
ExportOptions -> AudioFileName
|
|
ListOptions --> MathDocKind
|
|
AudioFileName --> UnsupportedFileExtensionError
|
|
}
|
|
}
|
|
package lang {}
|
|
package dasp {}
|
|
|
|
@enduml
|