Skip to main content

RedbStore

Struct RedbStore 

Source
pub struct RedbStore { /* private fields */ }
Expand description

A single-node journal store on redb.

Implementations§

Source§

impl RedbStore

Source

pub fn open(path: impl AsRef<Path>) -> Result<Self, StoreError>

Open (or create) a database file.

§Errors

If the file cannot be opened or the tables cannot be created.

Source

pub fn open_in_memory() -> Result<Self, StoreError>

An ephemeral database — for tests, for the simulator, and for the CLI’s default journal.

Actually in memory. It was not, and the reason is a comment that aged into a defect: it said redb has no in-memory backend, which was true of redb 1 and false since the dependency moved to 3. So the implementation created a file under std::env::temp_dir and unlinked it — an anonymous file, which behaves like memory right up until there is nowhere to put it.

That is not a hypothetical. agentplane run journals here by default, and the container image runs on a read-only root filesystem with no writable temp directory, so the documented first command failed with Read-only file system (os error 30) — a message naming neither the journal nor the temp directory. The same failure waits in any hardened deployment, a scratch container, or a sandbox with no /tmp.

A name that says in memory should not need a filesystem to be true.

§Errors

If the database cannot be initialised.

Source

pub fn for_tenant(self, tenant: TenantId) -> Self

A handle addressing one tenant’s keyspace.

Every key this store builds is prefixed, so two tenants may share one physical database and still not reach each other: a read for a run that belongs to another tenant finds nothing, because the key it looks under was never written.

The checkpoint origin carries the tenant too — two tenants sharing a database would otherwise publish checkpoints under one origin name, and a witness could not tell whose history it was cosigning. Composed at read time from the base name and the tenant rather than baked into a field: baking it in made the builder order-sensitive, so for_tenant called twice double-qualified the origin and origin() after for_tenant silently dropped the tenant — either way a checkpoint under a name no verifier ever saw again.

Source

pub fn origin(self, origin: impl Into<String>) -> Result<Self, StoreError>

Name this plane’s Merkle log.

Goes into every checkpoint, so two planes’ checkpoints cannot be confused for one another — which matters the moment they are published to a shared witness.

§Errors

If the name breaks Checkpoint::validate_origin, refused here rather than at the first checkpoint a witness turns away.

Source

pub fn signing_as(self, signer: Arc<dyn Signer>) -> Self

Write records signed as this identity.

Off unless asked, and the default is unsigned rather than self-signed: a plane that quietly minted its own key would produce records that look attested and prove nothing.

Source

pub fn upcasting_with(self, upcaster: Arc<dyn Upcaster>) -> Self

Read records through this upcaster instead of the one this build ships.

The default is current_upcaster, which is what a deployment wants; another is for a reader that must lift shapes this build’s own does not.

Source§

impl RedbStore

Source

pub async fn armed_timers(&self, run: RunId) -> Result<usize, StoreError>

How many armed timers a run still has.

For tests; the sweep uses claim_due, and an operator asking what a run waits for reads waiting_runs.

§Errors

If the count cannot be read.

Source

pub async fn armed_timer_rows( &self, run: RunId, ) -> Result<Vec<Timer>, StoreError>

The timers a run still has armed, as the rows the sweep would claim.

For tests, like armed_timers.

§Errors

If the rows cannot be read or decoded.

Trait Implementations§

Source§

impl AuthorityStore for RedbStore

Source§

fn tenant(&self) -> &str

Which tenant this handle’s standing authorities belong to.
Source§

fn issue<'life0, 'life1, 'async_trait>( &'life0 self, authority: &'life1 StandingAuthority, ) -> Pin<Box<dyn Future<Output = Result<(), AuthorityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record a new authority. Read more
Source§

fn draw<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 AuthorityId, key: EffectKey, amount: Spend, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<Drawn, AuthorityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume amount, or refuse and consume nothing. Read more
Source§

fn revoke<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 AuthorityId, reason: &'life2 str, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), AuthorityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Withdraw it. Idempotent; the first reason stands. Read more
Source§

fn state<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 AuthorityId, ) -> Pin<Box<dyn Future<Output = Result<Option<AuthorityState>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

What this authority permitted and has consumed. Read more
Source§

impl BatchStore for RedbStore

Source§

fn tenant(&self) -> &str

Which tenant this handle’s batches and item reservations belong to.
Source§

fn open<'life0, 'life1, 'async_trait>( &'life0 self, id: BatchId, plan_digest: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Register a batch. Idempotent on id, so a retried submission does not fork one act into two. Read more
Source§

fn plan_digest<'life0, 'async_trait>( &'life0 self, id: BatchId, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The plan digest this batch was opened with, or None for no such batch. Read more
Source§

fn mark_exhausted<'life0, 'async_trait>( &'life0 self, id: BatchId, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record that the source produced its last item. Read more
Source§

fn is_exhausted<'life0, 'async_trait>( &'life0 self, id: BatchId, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Whether the source has been read to the end.
Source§

fn reserve<'life0, 'life1, 'async_trait>( &'life0 self, batch: BatchId, key: &'life1 str, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<ItemRecord, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Claim an item and bind it to a run id, before the run starts. Read more
Source§

fn record<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, batch: BatchId, key: &'life1 str, outcome: &'life2 ItemOutcome, spend: Spend, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record how an item ended, and what it consumed. Read more
Source§

fn cursor<'life0, 'async_trait>( &'life0 self, batch: BatchId, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The highest key whose item reached a terminal outcome, with no unfinished item before it. Read more
Source§

fn census<'life0, 'async_trait>( &'life0 self, batch: BatchId, ) -> Pin<Box<dyn Future<Output = Result<BatchCensus, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Counts by outcome, plus reserved-but-unfinished.
Source§

fn items<'life0, 'async_trait>( &'life0 self, batch: BatchId, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<ItemRecord>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every item record, oldest key first. For operators and for tests; the driver uses cursor and census.
Source§

fn items_needing_attention<'life0, 'async_trait>( &'life0 self, batch: BatchId, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<ItemRecord>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The items that are not settled, oldest key first. Read more
Source§

impl CaseStore for RedbStore

Source§

fn tenant(&self) -> &str

Whose rows this handle can reach. Read more
Source§

fn correlate<'life0, 'life1, 'async_trait>( &'life0 self, keys: &'life1 [CorrelationKey], ) -> Pin<Box<dyn Future<Output = Result<Option<CaseId>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find an open case matching any of these keys. Read more
Source§

fn correlate_or_open<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, kind: &'life1 str, keys: &'life2 [CorrelationKey], at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<Correlation, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Correlate, or open a new case if nothing matched. Read more
Source§

fn case<'life0, 'async_trait>( &'life0 self, id: CaseId, ) -> Pin<Box<dyn Future<Output = Result<Option<Case>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch one case. Read more
Source§

fn cases<'life0, 'async_trait>( &'life0 self, after: Option<CaseId>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Case>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every case, one bounded page at a time, in stable id order. Read more
Source§

fn import_case<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, case: &'life1 Case, deadlines: &'life2 [Deadline], blobs: &'life3 [Digest], ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Write one complete case, exactly as given — an import authority, not a runtime path. Read more
Source§

fn attach_run<'life0, 'async_trait>( &'life0 self, case: CaseId, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record that a run touched this case.
Record that a case produced a blob. Read more
Source§

fn blobs_of<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Digest>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every blob this case produced, oldest first. Read more
Source§

fn put_state<'life0, 'async_trait>( &'life0 self, case: CaseId, expected: CaseVersion, state: Value, ) -> Pin<Box<dyn Future<Output = Result<CaseVersion, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Replace a case’s state, if it is still at expected. Read more
Source§

fn set_status<'life0, 'async_trait>( &'life0 self, case: CaseId, status: CaseStatus, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Move a case to a status. Read more
Source§

fn close<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Close a case. Read more
Source§

fn register_deadline<'life0, 'life1, 'async_trait>( &'life0 self, deadline: &'life1 Deadline, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Register an obligation. The resolved instant is stored as given and never recomputed. Read more
Source§

fn deadlines<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Deadline>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn set_deadline_state<'life0, 'life1, 'async_trait>( &'life0 self, case: CaseId, name: &'life1 str, state: DeadlineState, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn breach_deadline<'life0, 'life1, 'async_trait>( &'life0 self, case: CaseId, name: &'life1 str, now: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Breach an obligation and escalate its case, in one transaction, if it is still outstanding and due at now. Returns whether it applied. Read more
Source§

fn breaches_to_note<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Deadline>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Breaches breach_deadline applied whose account the sweep has not yet written, longest-overdue first.
Source§

fn mark_breach_noted<'life0, 'life1, 'async_trait>( &'life0 self, case: CaseId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record that a breach’s account is on the journal. Idempotent. Read more
Source§

fn record_drill<'life0, 'life1, 'async_trait>( &'life0 self, record: &'life1 DrillRecord, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record what the last recovery rehearsal found. Read more
Source§

fn last_drill<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<DrillRecord>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The last recovery rehearsal, or None if this plane has never run one. Read more
Source§

fn census<'life0, 'async_trait>( &'life0 self, now: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<CaseCensus, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

How much is open right now, for the gauges in runtime::metrics. Read more
Source§

fn due<'life0, 'async_trait>( &'life0 self, now: Timestamp, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Deadline>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Obligations that are due or approaching, oldest first. Read more
Source§

fn breached<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Deadline>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Missed obligations nobody has accounted for, longest-overdue first. Read more
Source§

fn acknowledge_breach<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, case: CaseId, name: &'life1 str, note: &'life2 BreachNote, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record that somebody has accounted for a breach. Read more
Source§

fn place_hold<'life0, 'life1, 'async_trait>( &'life0 self, case: CaseId, hold: &'life1 LegalHold, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Preserve this matter against every erasure verb until somebody lifts it. Read more
Source§

fn release_hold<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lift a hold, returning whether one was there to lift. Read more
Source§

fn release_hold_if<'life0, 'life1, 'async_trait>( &'life0 self, case: CaseId, standing: &'life1 LegalHold, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lift the hold on case only if it is still standing — same instant, same reason, same operator. Read more
Source§

fn hold<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<Option<LegalHold>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The hold on one matter, if it is held. Read more
Source§

fn begin_erasure<'life0, 'life1, 'async_trait>( &'life0 self, case: CaseId, at: Timestamp, reason: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ErasureStart, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record that case is being erased, deciding against a hold in the same write — the step erase_case takes before it destroys anything. Read more
Source§

fn complete_erasure<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record that the erasure begin_erasure marked has destroyed everything it reaches. Idempotent. Read more
Source§

fn erasure<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<Option<Erasure>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The erasure record on one matter, if an erasure was begun on it. Read more
Source§

fn holds<'life0, 'async_trait>( &'life0 self, after: Option<CaseId>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<(CaseId, LegalHold)>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every matter under hold, oldest hold first. Read more
Source§

fn by_status<'life0, 'async_trait>( &'life0 self, status: CaseStatus, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Case>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cases matching a status, newest first.
Source§

impl Clone for RedbStore

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RedbStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DisclosureRegister for RedbStore

Source§

fn record<'life0, 'life1, 'async_trait>( &'life0 self, act: &'life1 Disclosure, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Keep one act. Read more
Source§

fn disclosures<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, cases: &'life1 [CaseId], runs: &'life2 [RunId], ) -> Pin<Box<dyn Future<Output = Result<Vec<Disclosure>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Every act that carried any of cases or runs, oldest first. Read more
Source§

impl EventStore for RedbStore

Source§

fn tenant(&self) -> &str

Whose rows this handle can reach. Read more
Source§

fn buffer<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 InboundEvent, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record an inbound event, returning false if this (source, id) was already seen. Read more
Source§

fn subscribe<'life0, 'life1, 'async_trait>( &'life0 self, sub: &'life1 Subscription, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Register a run’s interest in a future event.
Source§

fn claim_for<'life0, 'life1, 'async_trait>( &'life0 self, sub: &'life1 Subscription, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<Option<BufferedEvent>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically find and claim a buffered event matching a subscription. Read more
Source§

fn match_waiter<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 InboundEvent, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<Option<Subscription>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically find and claim a subscription matching an arrived event. Read more
Source§

fn deliver_to<'life0, 'life1, 'async_trait>( &'life0 self, target: RunId, event: &'life1 InboundEvent, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<TargetedDelivery, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically buffer event and claim it for the matching subscription of exactly run. Read more
Source§

fn unsubscribe<'life0, 'async_trait>( &'life0 self, run: RunId, effect: EffectKey, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Drop a subscription once it has been satisfied. Read more
Source§

fn unsubscribe_run<'life0, 'life1, 'async_trait>( &'life0 self, run: RunId, unanswered: &'life1 [EffectKey], ) -> Pin<Box<dyn Future<Output = Result<Retired, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Drop every subscription a run holds, and hand back what it held claimed for a wait it never answered. Read more
Source§

fn park_wait<'life0, 'life1, 'async_trait>( &'life0 self, sub: &'life1 Subscription, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Register a wait that already holds a claimed event, and mark it for redelivery. Read more
Source§

fn parked_waits<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Subscription>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Waits holding a claimed event nothing has delivered yet. Read more
Source§

fn erase_payload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Remove one buffered event’s payload while keeping its identity. Read more
Source§

fn minter<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Minter>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Who minted the buffered event (source, id), or None when no such event was ever buffered. Read more
Source§

fn sweep_unclaimed<'life0, 'life1, 'async_trait>( &'life0 self, older_than: Timestamp, reason: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Move events nobody claimed within the window to the dead-letter list. Read more
Source§

fn dead_letters<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<DeadLetter>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Events that aged out unclaimed, newest first. Read more
Source§

fn waiting<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Subscription>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Runs currently waiting, for operational visibility.
Source§

impl JournalStore for RedbStore

Source§

fn is_shared(&self) -> bool

One file, one writer. That single writer is what makes exactly-once a table key and fencing race-free here — and it is why a plane that needs two instances needs PostgreSQL instead.

Source§

fn read_page<'life0, 'async_trait>( &'life0 self, run: RunId, from: Seq, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The bounded read, and the one that decodes — read is this with no ceiling, so the two cannot come to disagree about what a record is.

Source§

fn seals(&self) -> bool

Whether this store seals payloads on append, rewriting what it is handed. Read more
Source§

fn tenant(&self) -> &str

Whose rows this handle can reach. Read more
Source§

fn append<'life0, 'async_trait>( &'life0 self, epoch: Epoch, batch: Vec<Append>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append a batch, sealing each record into the chain. Read more
Source§

fn read<'life0, 'async_trait>( &'life0 self, run: RunId, from: Seq, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read a run’s records from from (inclusive, 1-based) onward. Read more
Source§

fn case_history<'life0, 'async_trait>( &'life0 self, case: CaseId, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Record>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every record belonging to a case, oldest first. Read more
Source§

fn head<'life0, 'async_trait>( &'life0 self, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<Head, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The run’s current chain head.
Source§

fn acquire<'life0, 'life1, 'async_trait>( &'life0 self, run: RunId, owner: &'life1 str, ttl: Duration, ) -> Pin<Box<dyn Future<Output = Result<Lease, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Take ownership of a run, returning the fencing epoch to write under. Read more
Source§

fn renew<'life0, 'life1, 'async_trait>( &'life0 self, run: RunId, owner: &'life1 str, epoch: Epoch, ttl: Duration, ) -> Pin<Box<dyn Future<Output = Result<Lease, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Extend a lease this caller still holds, without ever claiming one. Read more
Source§

fn release_lease<'life0, 'async_trait>( &'life0 self, run: RunId, epoch: Epoch, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Hand a lease back, so the next instance need not wait out the TTL. Read more
Source§

fn waiting_runs<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<WaitingRun>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The runs that are waiting, and what each one waits for. Read more
Source§

fn abandoned_runs<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<RunId>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Runs whose lease expired without being released — the runs an instance died holding. Read more
Source§

fn seal<'life0, 'life1, 'async_trait>( &'life0 self, run: RunId, epoch: Epoch, outcome: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Digest, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Close the chain and return its terminal hash — what a signature covers. Read more
Source§

fn admitted_as<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<RunId>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The run that holds this admission key, if one does. Read more
Source§

fn forget_admissions<'life0, 'async_trait>( &'life0 self, older_than: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retire admission keys claimed before older_than. Returns how many. Read more
Source§

fn runs_by_outcome<'life0, 'life1, 'async_trait>( &'life0 self, outcome: &'life1 str, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<RunId>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Concluded runs whose latest conclusion is outcome, newest first. Read more
Source§

fn count_by_outcome<'life0, 'life1, 'async_trait>( &'life0 self, outcome: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

How many runs currently rest on this conclusion. Read more
Source§

fn recent_runs<'life0, 'async_trait>( &'life0 self, after: Option<(u64, RunId)>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<(RunId, u64)>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Runs ordered by last durable append, newest first, one bounded page. Read more
Source§

fn runs_by_id<'life0, 'async_trait>( &'life0 self, after: Option<RunId>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<RunId>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every run this tenant holds records for, by run id ascending, one bounded page strictly after after. Read more
Source§

fn recent_runs_from<'life0, 'life1, 'async_trait>( &'life0 self, source: &'life1 str, after: Option<(u64, RunId)>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<(RunId, u64)>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

recent_runs, narrowed to the runs one producer admitted: those whose RunAdmitted carries an admission key whose source half (origin_source) is source. Read more
Source§

fn checkpoint<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Checkpoint, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

A commitment to the set of sealed runs. Read more
Source§

fn consistency_proof<'life0, 'async_trait>( &'life0 self, old_size: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<Digest>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prove the log has only grown since a checkpoint of old_size. Read more
Source§

fn consistency_proof_at<'life0, 'async_trait>( &'life0 self, old_size: u64, new_size: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<Digest>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prove the log as it stood at new_size leaves extends the one at old_size — the proof for a checkpoint an earlier checkpoint returned, not for the live log. Read more
Source§

fn inclusion_proof<'life0, 'async_trait>( &'life0 self, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<Option<Inclusion>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prove a sealed run is in the log this checkpoint commits to. Read more
Source§

fn inclusion_proof_at<'life0, 'async_trait>( &'life0 self, run: RunId, size: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Inclusion>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prove a sealed run is in the log as it stood at size leaves — the checkpoint an earlier checkpoint returned, not the live one. Read more
Source§

fn log_positions<'life0, 'life1, 'async_trait>( &'life0 self, runs: &'life1 [RunId], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<(u64, Digest)>>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Where each of runs sits in the log — its index and leaf — or None for a run that is not sealed, in the order asked. Read more
Source§

fn request_cancel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, run: RunId, actor: &'life1 Operator, reason: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Ask a run to stop, durably. Read more
Source§

fn cancellation<'life0, 'async_trait>( &'life0 self, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<Option<Cancellation>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The pending stop request for a run, if one was made. Read more
Source§

fn atomic(&self) -> Option<&dyn AtomicJournal>

This store’s own transaction, when a co-located resource can join it. Read more
Source§

fn verify<'life0, 'async_trait>( &'life0 self, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<Digest, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Verify a run’s chain end to end.
Source§

impl MemoryStore for RedbStore

Source§

fn tenant(&self) -> &str

Whose rows this handle can reach. Read more
Source§

fn seals(&self) -> bool

Whether this store seals payloads, and so runs a subject erasure of its own beneath any wrapper the plane adds. Read more
Source§

fn remember<'life0, 'life1, 'async_trait>( &'life0 self, item: &'life1 MemoryItem, ) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append a new version of a memory. Read more
Source§

fn recall<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 Recall, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The current versions matching a query — most trusted first, then newest, then id, globally across purposes (see Recall for why the ordering is contractual). Read more
Source§

fn subject_ids<'life0, 'life1, 'async_trait>( &'life0 self, subject: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Every id currently belonging to a subject — the erasure path’s enumeration. Read more
Source§

fn version<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<MemoryItem>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

One exact version, superseded or not. Read more
Source§

fn current<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, as_of: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = Result<Option<MemoryItem>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The one version of id a fresh recall at as_of would be allowed to see — or None, which covers a memory that was never written, was forgotten or swept, or whose effective expiry (min(expires_at, access window)) has passed the cutoff. None for as_of skips the expiry check, exactly as it does on recall. Read more
Source§

fn derivatives<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Memories derived from this one, directly. Read more
Source§

fn forget_cascading<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Cascade, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Forget a memory and everything derived from it, transitively. Read more
Source§

fn forget<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Forget a memory and every version of it. Read more
Source§

fn forget_subject<'life0, 'life1, 'async_trait>( &'life0 self, subject: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Forget everything about a subject. Read more
Place or release a legal hold. A held id cannot be forgotten, swept, or removed as part of subject/cascading erasure: those refuse with StoreError::UnderLegalHold, and the sweep passes over it.
Source§

fn legal_hold<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Whether an id is currently protected by legal hold.
Source§

fn legal_holds<'life0, 'life1, 'async_trait>( &'life0 self, after: Option<&'life1 str>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Every held id, in id order, starting after after. Read more
Source§

fn sweep_expired<'life0, 'async_trait>( &'life0 self, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<Vec<(String, u64)>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically erase current memories whose effective expiry has passed, unless held. Returns the ids erased, each with the highest version it held — what a sealing wrapper needs to destroy every version’s key. Read more
Source§

fn touch<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Refresh sliding access retention for current ids at a journaled instant. Read more
Source§

fn erasure_is_distributed(&self) -> Option<bool>

Whether this store’s erasure lifecycle lock spans instances. Read more
Source§

fn erasure_index(&self) -> Option<Arc<dyn SemanticRetriever>>

The semantic index every erasure through this handle reaches — a sealing layer’s own subject erasure included. Read more
Source§

fn erase_reaching<'life0, 'life1, 'async_trait>( &'life0 self, verb: MemoryErasure<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(Reached, Option<StoreError>), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run an erasure verb, answering what it removed from the rows even when a copy derived from them could not be told. Read more
Source§

impl PushStore for RedbStore

Source§

fn tenant(&self) -> &str

Whose rows this handle can reach. Read more
Source§

fn put<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 PushConfig, next_seq: Seq, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Register or replace a configuration. Read more
Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, task: RunId, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<PushConfig>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

One configuration. Read more
Source§

fn list<'life0, 'async_trait>( &'life0 self, task: RunId, ) -> Pin<Box<dyn Future<Output = Result<Vec<PushConfig>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every configuration for a task. Read more
Source§

fn due<'life0, 'async_trait>( &'life0 self, at: u64, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<PushRegistration>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Registrations whose retry instant has arrived, in stable order. Read more
Source§

fn due_in<'life0, 'async_trait>( &'life0 self, at: u64, limit: usize, namespace: PushNamespace, ) -> Pin<Box<dyn Future<Output = Result<DueBatch, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The due registrations of one namespace, however deep in the stable order they sit — plus a count of the other namespace’s due rows. Read more
Source§

fn advance<'life0, 'life1, 'async_trait>( &'life0 self, task: RunId, id: &'life1 str, next_seq: Seq, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Acknowledge every record before next_seq.
Source§

fn retry<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task: RunId, id: &'life1 str, next_attempt_at: u64, error: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record a failed attempt without advancing the cursor. Read more
Source§

fn park<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task: RunId, id: &'life1 str, error: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Stop delivering to this registration, and keep its cursor. Read more
Source§

fn parked<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<PushRegistration>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Parked registrations, in the store’s stable order. Read more
Source§

fn unpark<'life0, 'life1, 'async_trait>( &'life0 self, task: RunId, id: &'life1 str, at: u64, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Re-arm a parked registration: due at at, with its attempt count reset. Read more
Source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, task: RunId, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Forget one. Idempotent. Read more
Source§

impl QuotaStore for RedbStore

Source§

fn tenant(&self) -> &str

Which tenant this handle accounts for. Read more
Source§

fn reserve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, run: RunId, quota: &'life1 TenantQuota, hold: Option<&'life2 SpendHold>, at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), QuotaError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Take a concurrency slot for run, and hold its spend, or refuse. Read more
Source§

fn reserve_rate<'life0, 'life1, 'async_trait>( &'life0 self, reservation: &'life1 RateReservation, ) -> Pin<Box<dyn Future<Output = Result<(), QuotaError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Take room for one dispatch under its tool’s rate ceilings, or refuse. Read more
Source§

fn rate_room<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, grant: &'life1 str, ceilings: &'life2 [RateCeiling], at: Timestamp, ) -> Pin<Box<dyn Future<Output = Result<(), QuotaError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Whether a dispatch of grant would have room now, taking none. Read more
Source§

fn set_halt<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, scope: &'life1 HaltScope, by: &'life2 Operator, at: Timestamp, reason: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Stop work at scope from starting. Read more
Source§

fn lift_halt<'life0, 'life1, 'async_trait>( &'life0 self, scope: &'life1 HaltScope, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Let work at scope start again. Read more
Source§

fn lift_halt_if<'life0, 'life1, 'async_trait>( &'life0 self, standing: &'life1 Halt, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lift the halt at standing.scope only if the row there is still standing — same reason, same operator, same instant. Read more
Source§

fn halts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Halt>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every standing halt for this tenant. Read more
Source§

fn release<'life0, 'async_trait>( &'life0 self, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Give back, idempotently, the slot and the spend hold of an admission whose journal never landed, or of a run that concluded with no pass to settle. Read more
Source§

fn carry<'life0, 'life1, 'async_trait>( &'life0 self, run: RunId, period: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Move a run’s spend hold into period, where a resume is about to spend. Read more
Source§

fn reservations<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Held>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every run holding spend against this tenant’s periods, by run id. Read more
Source§

fn reserved<'life0, 'life1, 'async_trait>( &'life0 self, period: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Spend, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

What open runs hold against period. Read more
Source§

fn settle<'life0, 'life1, 'async_trait>( &'life0 self, settlement: &'life1 QuotaSettlement, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Settle one live pass exactly once. Read more
Source§

fn spent<'life0, 'life1, 'async_trait>( &'life0 self, period: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Spend, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

What this tenant has settled in period — spend that happened, not spend held. Read more
Source§

fn running<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u32, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

How many runs this tenant has executing. Read more
Source§

fn running_runs<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<RunId>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Which runs hold this tenant’s slots. Read more
Source§

impl Registry for RedbStore

Source§

fn publish<'life0, 'life1, 'async_trait>( &'life0 self, manifest: &'life1 Manifest, ) -> Pin<Box<dyn Future<Output = Result<Digest, RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Publish a manifest under its own name and version. Read more
Source§

fn publish_signed<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, manifest: &'life1 Manifest, signer: &'life2 dyn Signer, ) -> Pin<Box<dyn Future<Output = Result<Digest, RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Publish, and record who says so. Read more
Source§

fn resolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Manifest, RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolve a name and version to whatever the registry currently holds. Read more
Source§

fn resolve_verified<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, verifier: &'life3 dyn Verifier, ) -> Pin<Box<dyn Future<Output = Result<(Manifest, KeyId), RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Resolve, and refuse anything this verifier will not vouch for. Read more
Source§

fn versions<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Every published version of a name, in the registry’s order. Read more
Source§

fn names<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Every name this registry holds, sorted. Read more
Source§

fn resolve_pinned<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, expected: Digest, ) -> Pin<Box<dyn Future<Output = Result<Manifest, RegistryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolve, and refuse anything but the digest the caller expects. Read more
Source§

impl TaskStore for RedbStore

Source§

fn tenant(&self) -> &str

Whose rows this handle can reach. Read more
Source§

fn open<'life0, 'life1, 'async_trait>( &'life0 self, task: &'life1 Task, ) -> Pin<Box<dyn Future<Output = Result<Task, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a task, or return the existing one with this id. Read more
Source§

fn task<'life0, 'async_trait>( &'life0 self, id: TaskId, ) -> Pin<Box<dyn Future<Output = Result<Option<Task>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch one task. Named for what it returns — see CaseStore::case.
Source§

fn claim<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: TaskId, actor: &'life1 str, roles: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<Task, ClaimError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reserve a task for one actor. Read more
Source§

fn take_over<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: TaskId, from: &'life1 str, actor: &'life2 str, roles: &'life3 [String], ) -> Pin<Box<dyn Future<Output = Result<Task, ClaimError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Take a claim over from a holder who is not coming back. Read more
Source§

fn release<'life0, 'life1, 'async_trait>( &'life0 self, id: TaskId, actor: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), ClaimError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Release a claim without deciding. Read more
Source§

fn escalate<'life0, 'async_trait>( &'life0 self, id: TaskId, ) -> Pin<Box<dyn Future<Output = Result<Task, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Widen an unanswered task to its declared escalation audience. Read more
Source§

fn set_state<'life0, 'async_trait>( &'life0 self, id: TaskId, state: TaskState, ) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Settle a pending task, returning whether this call settled it. Read more
Source§

fn withdraw_run<'life0, 'life1, 'async_trait>( &'life0 self, run: RunId, awaited: &'life1 [TaskId], ) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Withdraw the tasks in awaited that belong to run and are still pending, returning how many. Read more
Source§

fn queue<'life0, 'life1, 'async_trait>( &'life0 self, roles: &'life1 [String], limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Open work, highest priority and oldest first.
Source§

fn for_case<'life0, 'async_trait>( &'life0 self, case: CaseId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Everything pending on one matter.
Source§

fn open_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

How many decisions are waiting on a person, across every role. Read more
Source§

fn overdue<'life0, 'async_trait>( &'life0 self, now: Timestamp, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tasks whose window has closed and whose expiry policy has not yet fired. Read more
Source§

impl TimerStore for RedbStore

Source§

fn tenant(&self) -> &str

Which tenant this handle’s wake-up rows belong to.
Source§

fn arm<'life0, 'life1, 'async_trait>( &'life0 self, timer: &'life1 Timer, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Register a run’s wake-up. Read more
Source§

fn claim_due<'life0, 'async_trait>( &'life0 self, now: Timestamp, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Timer>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically claim timers due at or before now. Read more
Source§

fn pending_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

How many runs are sleeping, for the gauge. Read more
Source§

fn disarm<'life0, 'async_trait>( &'life0 self, run: RunId, effect: EffectKey, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retire a fired timer.
Source§

fn disarm_run<'life0, 'async_trait>( &'life0 self, run: RunId, ) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retire every timer a run still has armed, returning how many. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<B> FullBackend for B

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more