Newtypes and broker refactor

Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
2026-01-02 00:22:55 +00:00
parent 146d775f02
commit 66e0e613fc
29 changed files with 1087 additions and 324 deletions

View File

@@ -42,4 +42,10 @@ pub trait LinkRepository: Send + Sync {
pub trait MessageBroker: Send + Sync {
/// Publish an event when a note is created or updated.
async fn publish_note_updated(&self, note: &Note) -> DomainResult<()>;
/// Subscribe to note update events.
/// Returns a stream of notes that have been updated.
async fn subscribe_note_updates(
&self,
) -> DomainResult<std::pin::Pin<Box<dyn futures_core::Stream<Item = Note> + Send>>>;
}