Skip to content

Commit 2f6ba98

Browse files
authored
Merge pull request #88 from traP-jp/feat/#87-alert-trait
✨ alert trait
2 parents 7e09d5d + 79c1b0f commit 2f6ba98

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

judge_control_app/src/alert.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pub trait Alert {
2+
async fn send_alert<MessageType: std::fmt::Display + Clone>(&self, message: &MessageType);
3+
}
4+
5+
pub trait StructuralAlert<BodyType: serde::Serialize + Clone> {
6+
async fn send_alert(&self, body: &BodyType);
7+
}

judge_control_app/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod alert;
12
pub mod container;
23
pub mod custom_rc;
34
pub mod models;

judge_control_app/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
mod alert;
12
mod container;
23
mod custom_rc;
34
mod models;

0 commit comments

Comments
 (0)