init event notifer

This commit is contained in:
houseme
2025-04-16 16:15:53 +08:00
parent 8ea6f7e627
commit 21a829e7cf
14 changed files with 831 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
// src/error.rs
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("target not found: {0}")]
TargetNotFound(String),
#[error("send failed: {0}")]
SendError(String),
#[error("target error: {0}")]
TargetError(String),
#[error("invalid configuration: {0}")]
ConfigError(String),
#[error("store error: {0}")]
StoreError(String),
#[error("invalid event name: {0}")]
InvalidEventName(String), // 添加此变体
}
pub type Result<T> = std::result::Result<T, Error>;