pub struct SiteDraftStore { /* private fields */ }Expand description
No process, timer or authority is created by this target adapter.
Implementations§
Source§impl SiteDraftStore
impl SiteDraftStore
Sourcepub fn new(
lifecycle: Arc<Lifecycle>,
approvals: Arc<dyn ApprovalReader>,
delivery: Arc<dyn OutcomeDelivery>,
at_ms: u64,
) -> Self
pub fn new( lifecycle: Arc<Lifecycle>, approvals: Arc<dyn ApprovalReader>, delivery: Arc<dyn OutcomeDelivery>, at_ms: u64, ) -> Self
Joins the existing approval reader and agent outcome owner.
Sourcepub fn receipt(&self, id: &str) -> Result<Option<Execution>, DraftError>
pub fn receipt(&self, id: &str) -> Result<Option<Execution>, DraftError>
Reads the target receipt through the approval owner’s atomic interface.
§Errors
The durable target ledger cannot be read.
Sourcepub const fn observe_execution_time(&mut self, at_ms: u64)
pub const fn observe_execution_time(&mut self, at_ms: u64)
The operation clock is observed by the pulling owner, never the request.
Sourcepub fn execute_approved(
&mut self,
draft: &ApprovedDraft,
) -> Result<Execution, DraftError>
pub fn execute_approved( &mut self, draft: &ApprovedDraft, ) -> Result<Execution, DraftError>
Validates every immutable field even on receipt replay, then delegates execution and durable deduplication to Lys’s shared executor contract.
§Errors
A conflicting target, grant, digest, words or execution failure.
Trait Implementations§
Source§impl AtomicDraftStore for SiteDraftStore
impl AtomicDraftStore for SiteDraftStore
Source§fn receipt(&self, draft: &str) -> Result<Option<Execution>, DraftError>
fn receipt(&self, draft: &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,
transition: &ApprovalTransition,
) -> Result<Execution, DraftError>
fn commit( &mut self, draft: &ApprovedDraft, transition: &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, draft: &str) -> Result<bool, DraftError>
fn acknowledged(&self, draft: &str) -> Result<bool, DraftError>
Whether Lys acknowledged this receipt; the marker survives restart. Read more
Source§fn acknowledge(
&mut self,
draft: &str,
receipt: &Execution,
) -> Result<(), DraftError>
fn acknowledge( &mut self, draft: &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
Source§impl Executor for SiteDraftStore
impl Executor for SiteDraftStore
Source§type Error = DraftError
type Error = DraftError
A product storage or execution failure.
Source§fn receipt(&self, draft: &str) -> Result<Option<Execution>, DraftError>
fn receipt(&self, draft: &str) -> Result<Option<Execution>, DraftError>
Read the committed outcome before attempting execution. Read more
Source§fn execute_and_record(
&mut self,
draft: &ApprovedDraft,
) -> Result<Execution, DraftError>
fn execute_and_record( &mut self, draft: &ApprovedDraft, ) -> Result<Execution, DraftError>
Atomically apply and record once per draft id; concurrent calls return the same receipt.
A stored id with another digest must be refused without applying anything. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SiteDraftStore
impl !UnwindSafe for SiteDraftStore
impl Freeze for SiteDraftStore
impl Send for SiteDraftStore
impl Sync for SiteDraftStore
impl Unpin for SiteDraftStore
impl UnsafeUnpin for SiteDraftStore
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