musicus/backend/src/error.rs
Elias Projahn f165c6cae8 Remove server synchronization code
This commit (tries to) remove all code for synchronyzing to a music
metadata server. Because the intended use cases of the application have
shifted over time, this isn't a central feature anymore. However, it
may well be decided to reintroduce the functionality at some point in
the future.
2022-01-23 14:06:00 +01:00

17 lines
505 B
Rust

/// An error that happened within the backend.
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error(transparent)]
DatabaseError(#[from] musicus_database::Error),
#[error("An error happened while decoding to UTF-8.")]
Utf8Error(#[from] std::str::Utf8Error),
#[error("Failed to receive an event.")]
RecvError(#[from] tokio::sync::broadcast::error::RecvError),
#[error("An error happened: {0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, Error>;