-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for demonstration log message over the web + some refacto…
…ring
- Loading branch information
Thomas Prévost
committed
Feb 15, 2024
1 parent
f23a540
commit ec41d0f
Showing
22 changed files
with
924 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//! Interface for important event subscribers, supposed to be used for demonstration purpose | ||
use std::io; | ||
|
||
/// Trait that should be implemented by important event subscribers | ||
/// Only events useful for demonstration purpose will be sent to the subscribers | ||
pub trait ImportantEventSubscriber where Self: Sync + Send { | ||
/// Receive a notification for an important event | ||
/// # Arguments | ||
/// * `message` - The notification message that should be sent to the subscriber | ||
/// # Returns | ||
/// An io::Error if the notification could not be sent, likely because of sync issue, or Ok(()) if the notification was sent successfully | ||
fn notify(&self, message: &str) -> Result<(), io::Error>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.