async_resource/pool/
error.rs1use std::fmt::{self, Debug, Formatter};
2
3pub enum AcquireError<E> {
4 Busy,
5 ResourceError(E),
6 Stopped,
7 Timeout,
8}
9
10impl<E: Debug> Debug for AcquireError<E> {
11 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
12 match &self {
13 Self::Busy => write!(f, "AcquireError::Busy"),
14 Self::ResourceError(err) => write!(f, "AcquireError::ResourceError({:?})", err),
15 Self::Stopped => write!(f, "AcquireError::Stopped"),
16 Self::Timeout => write!(f, "AcquireError::Timeout"),
17 }
18 }
19}