19 lines
429 B
Rust
19 lines
429 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum MirrorError {
|
|
#[error("git error: {0}")]
|
|
Git(String),
|
|
#[error("NATS error: {0}")]
|
|
Nats(String),
|
|
#[error("json error: {0}")]
|
|
Json(#[from] serde_json::Error),
|
|
#[error("io error: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
}
|
|
|
|
impl From<git2::Error> for MirrorError {
|
|
fn from(e: git2::Error) -> Self {
|
|
MirrorError::Git(e.to_string())
|
|
}
|
|
}
|