pub enum ActrCliError {
Show 17 variants
Config {
message: String,
},
InvalidProject {
message: String,
},
Network {
message: String,
},
Dependency {
message: String,
},
ServiceDiscovery {
message: String,
},
FingerprintValidation {
message: String,
},
CodeGeneration {
message: String,
},
Cache {
message: String,
},
UserInterface {
message: String,
},
Command {
message: String,
},
ValidationFailed {
details: String,
},
InstallFailed {
reason: String,
},
ComponentNotRegistered {
component: String,
},
Io(Error),
Serialization(Error),
Http(Error),
Other(Error),
}Expand description
CLI 统一错误类型
Variants§
Config
InvalidProject
Network
Dependency
ServiceDiscovery
FingerprintValidation
CodeGeneration
Cache
UserInterface
Command
ValidationFailed
InstallFailed
ComponentNotRegistered
Io(Error)
Serialization(Error)
Http(Error)
Other(Error)
Implementations§
Source§impl ActrCliError
用户友好的错误显示
impl ActrCliError
用户友好的错误显示
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
获取用户友好的错误消息
Sourcepub fn suggested_actions(&self) -> Vec<String>
pub fn suggested_actions(&self) -> Vec<String>
获取可能的解决方案
Sourcepub fn documentation_links(&self) -> Vec<(&str, &str)>
pub fn documentation_links(&self) -> Vec<(&str, &str)>
获取相关文档链接
Trait Implementations§
Source§impl Debug for ActrCliError
impl Debug for ActrCliError
Source§impl Display for ActrCliError
impl Display for ActrCliError
Source§impl Error for ActrCliError
impl Error for ActrCliError
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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for ActrCliError
impl From<Error> for ActrCliError
Source§impl From<Error> for ActrCliError
impl From<Error> for ActrCliError
Source§impl From<Error> for ActrCliError
impl From<Error> for ActrCliError
Source§impl From<Error> for ActrCliError
impl From<Error> for ActrCliError
Source§impl From<ValidationReport> for ActrCliError
将验证报告转换为错误
impl From<ValidationReport> for ActrCliError
将验证报告转换为错误
Source§fn from(report: ValidationReport) -> Self
fn from(report: ValidationReport) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ActrCliError
impl !RefUnwindSafe for ActrCliError
impl Send for ActrCliError
impl Sync for ActrCliError
impl Unpin for ActrCliError
impl !UnwindSafe for ActrCliError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.