azalea_service/error.rs
1use tokio::sync::broadcast;
2
3#[derive(thiserror::Error, Debug)]
4pub enum Error {
5 #[error("Service handled with success")]
6 Success,
7 #[error("Service failed to handle")]
8 Failure,
9}
10
11impl<T> From<broadcast::error::SendError<T>> for Error {
12 fn from(_value: broadcast::error::SendError<T>) -> Self {
13 Self::Failure
14 }
15}
16
17impl From<broadcast::error::RecvError> for Error {
18 fn from(_value: broadcast::error::RecvError) -> Self {
19 Self::Failure
20 }
21}