Skip to main content

ParentOwner

Trait ParentOwner 

pub trait ParentOwner {
    // Required methods
    fn lookup(
        &self,
        step: ParentStep,
    ) -> Result<Option<ParentRecord>, ParentFailure>;
    fn find_child(
        &self,
        child: ChildTicket,
    ) -> Result<Option<ParentRecord>, ParentFailure>;
    fn bind(
        &mut self,
        step: ParentStep,
        child: ChildTicket,
        intent: [u8; 32],
    ) -> Result<ParentRecord, ParentFailure>;
    fn commit(
        &mut self,
        commit: ChildCommit<'_>,
    ) -> Result<ParentReceipt, ParentFailure>;
}
Expand description

The real durable owner of the parent operation.

bind and commit must return only after their record is durable in the owner’s committed state. An equal repeat returns the retained record or receipt without advancing the parent again; any different child, intent, result or continuation for the same step is a Conflict.

Required Methods§

fn lookup( &self, step: ParentStep, ) -> Result<Option<ParentRecord>, ParentFailure>

fn find_child( &self, child: ChildTicket, ) -> Result<Option<ParentRecord>, ParentFailure>

fn bind( &mut self, step: ParentStep, child: ChildTicket, intent: [u8; 32], ) -> Result<ParentRecord, ParentFailure>

fn commit( &mut self, commit: ChildCommit<'_>, ) -> Result<ParentReceipt, ParentFailure>

Implementors§