| Crates.io | caryatid_module_spy |
| lib.rs | caryatid_module_spy |
| version | 0.12.0 |
| created_at | 2025-03-24 15:27:00.018495+00 |
| updated_at | 2025-06-18 15:02:07.546174+00 |
| description | Spy module for Caryatid |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1603896 |
| size | 38,365 |
The Spy module provides a way to observe any messages on the bus. It simply subscribes to a topic and logs the received messages.
The Spy module is configured with a topic to spy on:
[module.spy]
topic = mi5.top.secret
The spy module can receive any message types and logs them (as info) using their Debug trait.
The Spy module needs to be parameterised with the type of the outer message enum
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub enum Message {
None(()),
... all my messages ...
}
Then within your main.rs you would register the Spy module into the
process like this:
Spy::<Message>::register(&mut process);