pub enum StorageError {
ConnectionError(String),
QueryError(String),
TimeoutError(String),
NotFound(String),
AuthenticationError(String),
PermissionError(String),
InvalidConfig(String),
RateLimitError(String),
ValidationError(String),
}Expand description
存储错误
Variants§
ConnectionError(String)
连接错误
QueryError(String)
查询错误
TimeoutError(String)
超时错误
NotFound(String)
未找到
AuthenticationError(String)
认证错误
PermissionError(String)
权限错误
InvalidConfig(String)
无效配置
RateLimitError(String)
速率限制
ValidationError(String)
验证错误
Implementations§
Source§impl StorageError
impl StorageError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
判断是否为临时错误(可重试)
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
判断是否为永久错误(不可重试)
Trait Implementations§
Source§impl Clone for StorageError
impl Clone for StorageError
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
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()
Source§impl From<StorageError> for LimiteronError
impl From<StorageError> for LimiteronError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StorageError
impl RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnsafeUnpin for StorageError
impl UnwindSafe for StorageError
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