pub trait Owner: Clone + NamedEntity {
// Required methods
fn handle_duty<'life0, 'async_trait>(
&'life0 self,
duty: Duty,
) -> Pin<Box<dyn Future<Output = Result<DutyResult, BridgeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_txhandlers<'life0, 'async_trait>(
&'life0 self,
tx_type: TransactionType,
contract_context: ContractContext,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<TransactionType, TxHandler>, BridgeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_finalized_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dbtx: DatabaseTransaction<'life1, 'life2>,
block_id: u32,
block_height: u32,
block_cache: Arc<BlockCache>,
_light_client_proof_wait_interval_secs: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Owner trait with async handling and tx handler creation
Required Methods§
Sourcefn handle_duty<'life0, 'async_trait>(
&'life0 self,
duty: Duty,
) -> Pin<Box<dyn Future<Output = Result<DutyResult, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_duty<'life0, 'async_trait>(
&'life0 self,
duty: Duty,
) -> Pin<Box<dyn Future<Output = Result<DutyResult, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a protocol-related duty
Sourcefn create_txhandlers<'life0, 'async_trait>(
&'life0 self,
tx_type: TransactionType,
contract_context: ContractContext,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<TransactionType, TxHandler>, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_txhandlers<'life0, 'async_trait>(
&'life0 self,
tx_type: TransactionType,
contract_context: ContractContext,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<TransactionType, TxHandler>, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create the transactions for an instance of the L1 contract
Sourcefn handle_finalized_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dbtx: DatabaseTransaction<'life1, 'life2>,
block_id: u32,
block_height: u32,
block_cache: Arc<BlockCache>,
_light_client_proof_wait_interval_secs: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_finalized_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dbtx: DatabaseTransaction<'life1, 'life2>,
block_id: u32,
block_height: u32,
block_cache: Arc<BlockCache>,
_light_client_proof_wait_interval_secs: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle a new finalized block
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.