diff --git a/class.puml b/class.puml new file mode 100644 index 0000000..c3d2103 --- /dev/null +++ b/class.puml @@ -0,0 +1,61 @@ +@startuml Class Diagram + +package core { + package str { + package traits { + interface FromStr { + from_str(s: &str): Result + } + } + } +} + +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 } + +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