Skip to content

Commit

Permalink
Merge pull request #88 from traP-jp/feat/#87-alert-trait
Browse files Browse the repository at this point in the history
✨ alert trait
  • Loading branch information
comavius authored Dec 23, 2024
2 parents 7e09d5d + 79c1b0f commit 2f6ba98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions judge_control_app/src/alert.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub trait Alert {
async fn send_alert<MessageType: std::fmt::Display + Clone>(&self, message: &MessageType);
}

pub trait StructuralAlert<BodyType: serde::Serialize + Clone> {
async fn send_alert(&self, body: &BodyType);
}
1 change: 1 addition & 0 deletions judge_control_app/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod alert;
pub mod container;
pub mod custom_rc;
pub mod models;
Expand Down
1 change: 1 addition & 0 deletions judge_control_app/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod alert;
mod container;
mod custom_rc;
mod models;
Expand Down

0 comments on commit 2f6ba98

Please sign in to comment.