Trait oasis_core_runtime::rofl::App

source ·
pub trait App: Send + Sync {
    // Provided methods
    fn is_supported(&self) -> bool { ... }
    fn on_init(&mut self, host: Arc<dyn Host>) -> Result<()> { ... }
    fn on_runtime_block<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blk: &'life1 AnnotatedBlock,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn on_runtime_event<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        blk: &'life1 AnnotatedBlock,
        tags: &'life2 [Vec<u8>],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        method: &'life1 str,
        args: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

A ROFL application.

Provided Methods§

source

fn is_supported(&self) -> bool

Whether dispatch is supported.

source

fn on_init(&mut self, host: Arc<dyn Host>) -> Result<()>

Called on application initialization.

source

fn on_runtime_block<'life0, 'life1, 'async_trait>( &'life0 self, blk: &'life1 AnnotatedBlock, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called on new runtime block being received.

source

fn on_runtime_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, blk: &'life1 AnnotatedBlock, tags: &'life2 [Vec<u8>], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Called on new runtime event being detected.

source

fn query<'life0, 'life1, 'async_trait>( &'life0 self, method: &'life1 str, args: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called for runtime queries.

Implementors§