pub struct Executor { /* private fields */ }Expand description
The contract executor — runs operations deterministically in a sandbox
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn execute_operation(
&mut self,
operation_name: &str,
inputs_json: &str,
) -> Result<OperationResult>
pub fn execute_operation( &mut self, operation_name: &str, inputs_json: &str, ) -> Result<OperationResult>
Execute a named operation with JSON input parameters
Sourcepub fn execute_all(&mut self, requests_json: &str) -> Result<ExecutionResult>
pub fn execute_all(&mut self, requests_json: &str) -> Result<ExecutionResult>
Execute a contract fully: run all operations from a JSON array of requests Each request: { “operation”: “name”, “inputs”: { … } }
Sourcepub fn state(&self) -> &ExecutionState
pub fn state(&self) -> &ExecutionState
Get current state (immutable ref)
Sourcepub fn provenance(&self) -> &ProvenanceLog
pub fn provenance(&self) -> &ProvenanceLog
Get provenance log (immutable ref)
Auto Trait Implementations§
impl Freeze for Executor
impl RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnwindSafe for Executor
Blanket Implementations§
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