Trait transact::context::ContextLifecycle [−][src]
pub trait ContextLifecycle: Send {
fn create_context(
&mut self,
dependent_contexts: &[ContextId],
state_id: &str
) -> ContextId;
fn drop_context(&mut self, context_id: ContextId);
fn get_transaction_receipt(
&self,
context_id: &ContextId,
transaction_id: &str
) -> Result<TransactionReceipt, ContextManagerError>;
fn clone_box(&self) -> Box<dyn ContextLifecycle>;
}
Expand description
ContextManager functionality used by the Scheduler.
Required methods
Create a new Context, returning a unique ContextId.
fn drop_context(&mut self, context_id: ContextId)
fn get_transaction_receipt(
&self,
context_id: &ContextId,
transaction_id: &str
) -> Result<TransactionReceipt, ContextManagerError>
fn clone_box(&self) -> Box<dyn ContextLifecycle>
fn clone_box(&self) -> Box<dyn ContextLifecycle>
Clone implementation for ContextLifecycle
. The implementation of the Clone
trait for
Box<dyn ContextLifecycle>
calls this method.