mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-04-28 13:30:14 +02:00
19 lines
446 B
Plaintext
19 lines
446 B
Plaintext
use tek::*;
|
|
|
|
struct ExamplePhrases(Vec<Arc<RwLock<Phrase>>>);
|
|
|
|
impl HasPhrases for ExamplePhrases {
|
|
fn phrases (&self) -> &Vec<Arc<RwLock<Phrase>>> {
|
|
&self.0
|
|
}
|
|
fn phrases_mut (&mut self) -> &mut Vec<Arc<RwLock<Phrase>>> {
|
|
&mut self.0
|
|
}
|
|
}
|
|
|
|
fn main () -> Usually<()> {
|
|
let mut phrases = ExamplePhrases(vec![]);
|
|
PhrasePoolCommand::Import(0, String::from("./example.mid")).execute(&mut phrases)?;
|
|
Ok(())
|
|
}
|