#[non_exhaustive]pub enum ConcurrentErrors {
Producer(String),
Sender(Box<dyn Error + Send + Sync + 'static>),
Receiver(String),
Thread(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Series of errors that might happen when processing files concurrently.
Marked #[non_exhaustive] so future failure modes can be added
without a SemVer break. Variants whose construction site has a
concrete underlying std::error::Error (Sender, Thread)
carry it as a boxed source and surface it through
std::error::Error::source; variants whose only available
information is a thread-panic payload (Producer, Receiver)
carry a message and return None from source, because a join
failure yields a Box<dyn Any + Send>, not an Error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Producer(String)
Producer side error.
The producer thread panicked and joining it failed. The panic
payload is not a std::error::Error, so this variant carries
only a message and has no source.
Sender(Box<dyn Error + Send + Sync + 'static>)
Sender side error.
An item (or the poison-pill) could not be placed on the channel
because every receiver was dropped. Carries the originating
channel send error as its source.
Receiver(String)
Receiver side error.
A consumer thread panicked and joining it failed. The panic
payload is not a std::error::Error, so this variant carries
only a message and has no source.
Thread(Box<dyn Error + Send + Sync + 'static>)
Thread side error.
A worker thread (producer or consumer) could not be spawned.
Carries the originating std::io::Error as its
source.
Trait Implementations§
Source§impl Debug for ConcurrentErrors
impl Debug for ConcurrentErrors
Source§impl Display for ConcurrentErrors
impl Display for ConcurrentErrors
Source§impl Error for ConcurrentErrors
impl Error for ConcurrentErrors
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()