forked from jmug/stoatchat
feat: initial work on tenor gif searching
This commit is contained in:
committed by
Angelo Kontaxis
parent
bfe4018e43
commit
b0c977b324
20
crates/core/coalesced/src/error.rs
Normal file
20
crates/core/coalesced/src/error.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
pub enum Error {
|
||||
RecvError,
|
||||
MaxConcurrent,
|
||||
MaxQueue,
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Error::RecvError => write!(f, "Unable to receive data from the channel"),
|
||||
Error::MaxConcurrent => write!(f, "Max number of tasks running at once"),
|
||||
Error::MaxQueue => write!(f, "Max number of tasks in queue"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for Error {}
|
||||
Reference in New Issue
Block a user