mithril_dmq/publisher/interface.rs
1use mithril_common::{StdResult, crypto_helper::TryToBytes};
2
3/// Trait for publishing messages from a DMQ node.
4#[cfg_attr(test, mockall::automock)]
5#[async_trait::async_trait]
6pub trait DmqPublisher<M: TryToBytes + Send + Sync>: Send + Sync {
7 /// Publishes a message to the DMQ node.
8 async fn publish_message(&self, message: M) -> StdResult<()>;
9}