pub trait RegistryWrite: Send + Sync {
// Required methods
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 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 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 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 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;
}Expand description
The async write side of the family adapter pair (the alkcall
OwnershipStore posture).
Every mutation is transactional on the implementor’s durable
surface: engine twins bump the durable registry_seq singleton
inside the row-write transaction and their row commit also carries
the refs-table legs the composition owes (HEAD seeding at record
creation, ref-row removal at repo removal — substrate.md §refs);
the in-memory adapter bumps a process-local counter. The returned
sequence number is the mutation’s watermark currency; failed
mutations consume none.
Post-commit announce (publish/notify/enqueue) and the reactive halves live in the reactor module — never inside the pair.
Required Methods§
Sourcefn 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,
Create a repo record. RegistryError::Invalid on a malformed
id or record, RegistryError::AlreadyExists when the id is
taken. Returns the mutation’s sequence number.
Sourcefn 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,
Replace a repo record (the grant-mutation path, ADR-011).
RegistryError::Invalid on a malformed record,
RegistryError::NotFound when the id is absent. Returns the
mutation’s sequence number.
Sourcefn 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,
Remove a repo record. RegistryError::NotFound when the id
is absent. Returns the removal’s sequence number.
Sourcefn 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,
The table’s current watermark: the max sequence number ever assigned (0 on a fresh table). Monotone — a committed removal advances it even though it leaves no row.
Sourcefn 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,
The reconcile catch-up read: every row mutated after seq, in
sequence order. rows_since(0) is the whole table — the cached
provider’s snapshot-refresh read (whole-table by contract).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".