pub enum TraitKitError {
CycleDetected {
cycle: Vec<&'static str>,
},
DependencyMissing {
module: &'static str,
missing: &'static str,
},
AlreadyRegistered {
module: &'static str,
},
BuildFailed {
context: &'static str,
source: Box<dyn Error + Send + 'static>,
},
MissingCapability {
key: &'static str,
},
MissingConfig {
key: &'static str,
},
}Expand description
Unified trait-kit error type.
Follows the ProjectNameError naming convention used across the base workspace.
Display 实现通过 tr 查询 Fluent 消息目录,自动根据当前 locale 输出对应语言文本。
Variants§
CycleDetected
依赖图中检测到环。
DependencyMissing
依赖的模块未注册。
AlreadyRegistered
模块重复注册。
BuildFailed
模块构建失败。
MissingCapability
请求的能力不存在。
MissingConfig
请求的配置不存在。
Trait Implementations§
Source§impl Debug for TraitKitError
impl Debug for TraitKitError
Source§impl Display for TraitKitError
impl Display for TraitKitError
Source§impl Error for TraitKitError
impl Error for TraitKitError
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 !RefUnwindSafe for TraitKitError
impl !Sync for TraitKitError
impl !UnwindSafe for TraitKitError
impl Freeze for TraitKitError
impl Send for TraitKitError
impl Unpin for TraitKitError
impl UnsafeUnpin for TraitKitError
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more