pub enum PoolError {
Exhausted,
Timeout,
AlreadyAcquired,
NotAcquired,
InvalidConfig(String),
Internal(String),
Closed,
ConnectionFailed(String),
}Expand description
连接池特有错误
Variants§
Exhausted
连接池耗尽
Timeout
获取连接超时
AlreadyAcquired
连接已被获取
NotAcquired
连接未被获取
InvalidConfig(String)
配置非法
Internal(String)
内部错误
Closed
连接池已关闭(close_all 后拒绝新 acquire)
ConnectionFailed(String)
连接创建失败(保留原始错误信息)
Implementations§
Trait Implementations§
Source§impl Error for PoolError
impl Error for PoolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PoolError
impl RefUnwindSafe for PoolError
impl Send for PoolError
impl Sync for PoolError
impl Unpin for PoolError
impl UnsafeUnpin for PoolError
impl UnwindSafe for PoolError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more