pub enum SentinelPoolError {
Redis(RedisError),
Pool(String),
Config(String),
RetryExhausted {
attempts: u32,
source: RedisError,
},
WatcherStopped(String),
}Expand description
连接池操作的统一错误类型。
Variants§
Redis(RedisError)
底层 redis-rs 抛出的错误(含 Sentinel 解析失败、命令执行失败等)。
Pool(String)
bb8 连接池本身的错误(例如等待超时、池已关闭等)。
Config(String)
配置参数非法。
RetryExhausted
在多次重试后命令仍然失败。
WatcherStopped(String)
后台 watcher 因为不可恢复的错误已经退出。
Trait Implementations§
Source§impl Debug for SentinelPoolError
impl Debug for SentinelPoolError
Source§impl Display for SentinelPoolError
impl Display for SentinelPoolError
Source§impl Error for SentinelPoolError
impl Error for SentinelPoolError
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()
Source§impl From<RedisError> for SentinelPoolError
impl From<RedisError> for SentinelPoolError
Source§fn from(source: RedisError) -> Self
fn from(source: RedisError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SentinelPoolError
impl !RefUnwindSafe for SentinelPoolError
impl Send for SentinelPoolError
impl Sync for SentinelPoolError
impl Unpin for SentinelPoolError
impl UnsafeUnpin for SentinelPoolError
impl !UnwindSafe for SentinelPoolError
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