pub enum DockerErrorKind {
Show 41 variants
InvalidFormat {
field: String,
expected: String,
},
OutOfRange {
field: String,
min: Option<String>,
max: Option<String>,
},
Required {
field: String,
},
AlreadyExists {
field: String,
value: String,
},
NotAllowed {
field: String,
allowed: Vec<String>,
},
InvalidParams {
param: String,
reason: String,
},
InvalidCredentials,
AccountLocked,
UserNotFound {
identifier: String,
},
UserAlreadyExists {
username: String,
},
InvalidToken {
reason: String,
},
TokenExpired,
PermissionDenied {
action: String,
},
Forbidden {
resource: String,
},
ResourceNotFound {
resource_type: String,
identifier: String,
},
ResourceConflict {
resource: String,
reason: String,
},
RateLimited {
limit: u64,
},
ConnectionFailed {
target: String,
},
DnsResolutionFailed {
host: String,
},
ServiceUnavailable {
service: String,
},
StorageReadFailed {
path: String,
},
StorageWriteFailed {
path: String,
},
StorageDeleteFailed {
path: String,
},
InsufficientCapacity {
required: u64,
available: u64,
},
StorageFileNotFound {
path: String,
},
ConfigMissing {
key: String,
},
ConfigInvalid {
key: String,
reason: String,
},
InternalError {
reason: String,
},
NotImplemented {
feature: String,
},
IoError {
operation: String,
reason: String,
},
JsonError {
reason: String,
},
ParseError {
type_name: String,
reason: String,
},
RequestError {
url: String,
reason: String,
},
ContainerError {
reason: String,
},
ImageError {
reason: String,
},
NetworkError {
reason: String,
},
RuntimeError {
reason: String,
},
RegistryError {
reason: String,
},
EtcdError {
reason: String,
},
MonitorError {
reason: String,
},
KubernetesError {
reason: String,
},
}Expand description
统一错误类型枚举
整合所有模块的错误变体,每个变体对应一个 i18n key。
Variants§
InvalidFormat
无效格式
OutOfRange
值超出范围
Required
必填字段缺失
AlreadyExists
值已存在
NotAllowed
值不允许
InvalidParams
无效参数
InvalidCredentials
无效凭证
AccountLocked
账户已锁定
UserNotFound
用户未找到
UserAlreadyExists
用户已存在
InvalidToken
无效令牌
TokenExpired
令牌已过期
PermissionDenied
权限拒绝
Forbidden
禁止访问
ResourceNotFound
资源未找到
ResourceConflict
资源冲突
RateLimited
限流超出
ConnectionFailed
连接失败
DnsResolutionFailed
DNS 解析失败
服务不可用
StorageReadFailed
读取失败
StorageWriteFailed
写入失败
StorageDeleteFailed
删除失败
InsufficientCapacity
容量不足
StorageFileNotFound
文件未找到
ConfigMissing
配置缺失
ConfigInvalid
配置无效
InternalError
内部错误
NotImplemented
未实现
IoError
IO 错误
JsonError
JSON 错误
ParseError
解析错误
RequestError
请求错误
ContainerError
容器错误
ImageError
镜像错误
NetworkError
网络错误
RuntimeError
运行时错误
RegistryError
注册表错误
EtcdError
Etcd 错误
MonitorError
监控错误
KubernetesError
Kubernetes 错误
Implementations§
Trait Implementations§
Source§impl Clone for DockerErrorKind
impl Clone for DockerErrorKind
Source§fn clone(&self) -> DockerErrorKind
fn clone(&self) -> DockerErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DockerErrorKind
impl Debug for DockerErrorKind
Source§impl<'de> Deserialize<'de> for DockerErrorKind
impl<'de> Deserialize<'de> for DockerErrorKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DockerErrorKind
impl Display for DockerErrorKind
Auto Trait Implementations§
impl Freeze for DockerErrorKind
impl RefUnwindSafe for DockerErrorKind
impl Send for DockerErrorKind
impl Sync for DockerErrorKind
impl Unpin for DockerErrorKind
impl UnsafeUnpin for DockerErrorKind
impl UnwindSafe for DockerErrorKind
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