OracleCallback

Trait OracleCallback 

Source
pub trait OracleCallback: Send {
    // Required method
    fn handle_foreign_call<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        function: &'life1 str,
        inputs: Vec<Vec<Fr>>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Fr>>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for oracle callback during ACVM execution.

Using a trait instead of a closure avoids the lifetime issues with async closures capturing mutable references.

Required Methods§

Source

fn handle_foreign_call<'life0, 'life1, 'async_trait>( &'life0 mut self, function: &'life1 str, inputs: Vec<Vec<Fr>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Fr>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<'a, N: AztecNode + Send + Sync + 'static> OracleCallback for PrivateExecutionOracle<'a, N>

Source§

impl<'a, N: AztecNode + Send + Sync + 'static> OracleCallback for UtilityExecutionOracle<'a, N>