pub enum CollectorError {
Io {
source: Error,
path: PathBuf,
},
TomlParse {
source: Error,
path: PathBuf,
},
Sqlite(Error),
SerdeJson(Error),
Command {
message: String,
source: Box<dyn Error + Send + Sync>,
},
Http {
message: String,
source: Box<dyn Error + Send + Sync>,
},
Reporter {
reason: String,
},
}Expand description
收集器错误类型。
Variants§
Io
I/O 错误(文件读写失败)。
TomlParse
TOML 解析错误。
Sqlite(Error)
SQLite 持久化错误。
SerdeJson(Error)
JSON 序列化/反序列化错误。
Command
外部命令执行错误(如 gh CLI)。
Http
HTTP 请求错误。
Reporter
上报器错误(通用)。
Trait Implementations§
Source§impl Debug for CollectorError
impl Debug for CollectorError
Source§impl Display for CollectorError
impl Display for CollectorError
Source§impl Error for CollectorError
impl Error for CollectorError
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 CollectorError
impl !UnwindSafe for CollectorError
impl Freeze for CollectorError
impl Send for CollectorError
impl Sync for CollectorError
impl Unpin for CollectorError
impl UnsafeUnpin for CollectorError
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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