Krolyxon
Commit 815a27a

rmptuisrcevent.rs

20 lines · 471 B · Rust

1//! Events delivered to the application loop by background tasks.
2
3use crate::{lyrics::LookupResult, mpd::MpdEvent};
4
5#[derive(Debug)]
6pub enum AppEvent {
7 Mpd(MpdEvent),
8 Lyrics {
9 file: String,
10 result: LookupResult,
11 },
12 /// Tag writes finished: the directories to rescan, or an error.
13 TagsWritten(Result<Vec<String>, String>),
14}
15
16impl From<MpdEvent> for AppEvent {
17 fn from(event: MpdEvent) -> Self {
18 Self::Mpd(event)
19 }
20}