unknownrori_simple_thread_pool/
error.rs

1#[derive(Debug)]
2pub struct FailedToSendJob;
3
4impl core::fmt::Display for FailedToSendJob {
5    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6        f.write_fmt(format_args!("Thread pool failed to send a job to it's worker! the channel connection has been abruptly closed!"))?;
7
8        Ok(())
9    }
10}
11
12#[derive(Debug)]
13pub struct FailedToSpawnThread;
14
15impl core::fmt::Display for FailedToSpawnThread {
16    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17        f.write_fmt(format_args!("Thread pool failed to create worker thread!"))?;
18
19        Ok(())
20    }
21}