Skip to main content

CommandExecutor

Trait CommandExecutor 

Source
pub trait CommandExecutor {
    // Required methods
    fn execute_for_transaction<'life0, 'async_trait>(
        &'life0 self,
        command: DamlCommand,
    ) -> Pin<Box<dyn Future<Output = DamlResult<DamlTransaction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_for_transaction_with_effects<'life0, 'async_trait>(
        &'life0 self,
        command: DamlCommand,
    ) -> Pin<Box<dyn Future<Output = DamlResult<DamlTransaction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_create<'life0, 'async_trait>(
        &'life0 self,
        create_command: DamlCreateCommand,
    ) -> Pin<Box<dyn Future<Output = DamlResult<DamlCreatedEvent>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_exercise<'life0, 'async_trait>(
        &'life0 self,
        exercise_command: DamlExerciseCommand,
    ) -> Pin<Box<dyn Future<Output = DamlResult<DamlValue>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

An async failable Daml command executor.

v2 removed the dedicated TransactionTree response shape: the tree-shaped (ledger-effects) view is now selectable on the same SubmitAndWaitForTransaction RPC via a TransactionFormat whose transaction_shape = LedgerEffects. The executor exposes that selection through Self::execute_for_transaction_with_effects which returns the same DamlTransaction populated with both Created and Exercised events.

Required Methods§

Source

fn execute_for_transaction<'life0, 'async_trait>( &'life0 self, command: DamlCommand, ) -> Pin<Box<dyn Future<Output = DamlResult<DamlTransaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn execute_for_transaction_with_effects<'life0, 'async_trait>( &'life0 self, command: DamlCommand, ) -> Pin<Box<dyn Future<Output = DamlResult<DamlTransaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn execute_create<'life0, 'async_trait>( &'life0 self, create_command: DamlCreateCommand, ) -> Pin<Box<dyn Future<Output = DamlResult<DamlCreatedEvent>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn execute_exercise<'life0, 'async_trait>( &'life0 self, exercise_command: DamlExerciseCommand, ) -> Pin<Box<dyn Future<Output = DamlResult<DamlValue>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§