pub struct AnnouncingRegistry { /* private fields */ }Expand description
The announced write side — the reactive composition’s writing
surface: the durable registry write side folded with the reactor,
so every mutation’s post-commit announce (Reactor::announce,
fail-soft each) fires right after its durable commit. This is the
wrapper the engine-twin assembly constructors compose — the pair’s
durable contract below is unchanged (announce is never the pair’s;
the wrapper is the caller, and the announce’s machinery is the
reactor’s).
Consumers bind this as the write side of their
RegistryBackend (the store methods then
announce post-commit); a suppressed announce is the crash-window
shape the reconcile sweep closes — the mutation still committed
(the seq is transactionally exact, never announce-dependent).
Contract stamp: ADR-019 §5 (the post-commit announce posture) and
§7 (the announced receive flow).
Implementations§
Source§impl AnnouncingRegistry
impl AnnouncingRegistry
Sourcepub fn new(durable: Arc<dyn RegistryWrite>, reactor: Arc<Reactor>) -> Self
pub fn new(durable: Arc<dyn RegistryWrite>, reactor: Arc<Reactor>) -> Self
Wrap the durable write side + the reactor that announces for it.
Sourcepub fn durable(&self) -> &Arc<dyn RegistryWrite> ⓘ
pub fn durable(&self) -> &Arc<dyn RegistryWrite> ⓘ
The durable write side below the announce (the marker write’s and the reconcile machinery’s legs run at this layer).
Trait Implementations§
Source§impl RegistryWrite for AnnouncingRegistry
impl RegistryWrite for AnnouncingRegistry
Source§fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
RegistryError::Invalid on a malformed
id or record, RegistryError::AlreadyExists when the id is
taken. Returns the mutation’s sequence number.Source§fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
RegistryError::Invalid on a malformed record,
RegistryError::NotFound when the id is absent. Returns the
mutation’s sequence number.Source§fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
RegistryError::NotFound when the id
is absent. Returns the removal’s sequence number.Source§fn watermark<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watermark<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn rows_since<'life0, 'async_trait>(
&'life0 self,
seq: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<RegistryRow>, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rows_since<'life0, 'async_trait>(
&'life0 self,
seq: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<RegistryRow>, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
seq, in
sequence order. rows_since(0) is the whole table — the cached
provider’s snapshot-refresh read (whole-table by contract).