pub struct AgentDraftStore { /* private fields */ }Expand description
The native agent owner applies its transition through the approval journal.
Implementations§
Source§impl AgentDraftStore
impl AgentDraftStore
Sourcepub fn new(owners: &ApprovalAgents, delivery: Arc<dyn OutcomeDelivery>) -> Self
pub fn new(owners: &ApprovalAgents, delivery: Arc<dyn OutcomeDelivery>) -> Self
Uses the registry that was opened over this exact approval journal.
Source§impl AgentDraftStore
impl AgentDraftStore
Sourcepub fn with_projection(self, projection: Arc<dyn AgentProjection>) -> Self
pub fn with_projection(self, projection: Arc<dyn AgentProjection>) -> Self
Shares the server’s existing native inbox and retirement projection.
Trait Implementations§
Source§impl AtomicDraftStore for AgentDraftStore
impl AtomicDraftStore for AgentDraftStore
Source§fn receipt(&self, id: &str) -> Result<Option<Execution>, DraftError>
fn receipt(&self, id: &str) -> Result<Option<Execution>, DraftError>
Reads a committed receipt by immutable draft id. Read more
Source§fn approval(
&self,
draft: &ApprovedDraft,
) -> Result<ApprovalEvidence, DraftError>
fn approval( &self, draft: &ApprovedDraft, ) -> Result<ApprovalEvidence, DraftError>
Reads authenticated approver evidence for this exact draft and digest. Read more
Source§fn commit(
&mut self,
draft: &ApprovedDraft,
approval: &ApprovalTransition,
) -> Result<Execution, DraftError>
fn commit( &mut self, draft: &ApprovedDraft, approval: &ApprovalTransition, ) -> Result<Execution, DraftError>
One durable operation applies the prepared target mutation, transition,
receipt and outcome outbox, or commits a named refusal without mutation.
Concurrent/replayed ids answer the first receipt. A stored digest,
target, grant or words mismatch never applies a new mutation. Read more
Source§fn acknowledged(&self, id: &str) -> Result<bool, DraftError>
fn acknowledged(&self, id: &str) -> Result<bool, DraftError>
Whether Lys acknowledged this receipt; the marker survives restart. Read more
Source§fn acknowledge(
&mut self,
id: &str,
receipt: &Execution,
) -> Result<(), DraftError>
fn acknowledge( &mut self, id: &str, receipt: &Execution, ) -> Result<(), DraftError>
Keeps the successful acknowledgment without changing the target again.
A marker can be set only when
receipt matches the committed outcome. Read moreSource§fn pending_acknowledgments(
&self,
limit: NonZeroUsize,
) -> Result<Vec<ApprovedDraft>, DraftError>
fn pending_acknowledgments( &self, limit: NonZeroUsize, ) -> Result<Vec<ApprovedDraft>, DraftError>
Reads at most
limit locally committed but unacknowledged drafts.
A close whose response was lost may already be absent from Lys’s page. Read moreSource§fn deliver_outcome(
&mut self,
draft: &ApprovedDraft,
receipt: &Execution,
) -> Result<(), DraftError>
fn deliver_outcome( &mut self, draft: &ApprovedDraft, receipt: &Execution, ) -> Result<(), DraftError>
Delivers the committed outbox through the retained state writer and
inbox with server provenance. The same operation is idempotent after
restart. An unrelated holder is never rebound from a request’s name. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AgentDraftStore
impl !UnwindSafe for AgentDraftStore
impl Freeze for AgentDraftStore
impl Send for AgentDraftStore
impl Sync for AgentDraftStore
impl Unpin for AgentDraftStore
impl UnsafeUnpin for AgentDraftStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more