Trait linera_execution::ExecutionRuntimeContext

source ·
pub trait ExecutionRuntimeContext {
    // Required methods
    fn chain_id(&self) -> ChainId;
    fn execution_runtime_config(&self) -> ExecutionRuntimeConfig;
    fn user_contracts(
        &self,
    ) -> &Arc<DashMap<UserApplicationId, UserContractCode>>;
    fn user_services(&self) -> &Arc<DashMap<UserApplicationId, UserServiceCode>>;
    fn get_user_contract<'life0, 'life1, 'async_trait>(
        &'life0 self,
        description: &'life1 UserApplicationDescription,
    ) -> Pin<Box<dyn Future<Output = Result<UserContractCode, ExecutionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_user_service<'life0, 'life1, 'async_trait>(
        &'life0 self,
        description: &'life1 UserApplicationDescription,
    ) -> Pin<Box<dyn Future<Output = Result<UserServiceCode, ExecutionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_blob<'life0, 'async_trait>(
        &'life0 self,
        blob_id: BlobId,
    ) -> Pin<Box<dyn Future<Output = Result<Blob, ViewError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_event<'life0, 'async_trait>(
        &'life0 self,
        event_id: EventId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ViewError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn contains_blob<'life0, 'async_trait>(
        &'life0 self,
        blob_id: BlobId,
    ) -> Pin<Box<dyn Future<Output = Result<bool, ViewError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_blobs<'life0, 'async_trait>(
        &'life0 self,
        blobs: impl 'async_trait + IntoIterator<Item = Blob> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_events<'life0, 'async_trait>(
        &'life0 self,
        events: impl 'async_trait + IntoIterator<Item = (EventId, Vec<u8>)> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Requirements for the extra field in our state views (and notably the ExecutionStateView).

Required Methods§

source

fn chain_id(&self) -> ChainId

source

fn execution_runtime_config(&self) -> ExecutionRuntimeConfig

source

fn user_contracts(&self) -> &Arc<DashMap<UserApplicationId, UserContractCode>>

source

fn user_services(&self) -> &Arc<DashMap<UserApplicationId, UserServiceCode>>

source

fn get_user_contract<'life0, 'life1, 'async_trait>( &'life0 self, description: &'life1 UserApplicationDescription, ) -> Pin<Box<dyn Future<Output = Result<UserContractCode, ExecutionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_user_service<'life0, 'life1, 'async_trait>( &'life0 self, description: &'life1 UserApplicationDescription, ) -> Pin<Box<dyn Future<Output = Result<UserServiceCode, ExecutionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_blob<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, ) -> Pin<Box<dyn Future<Output = Result<Blob, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_event<'life0, 'async_trait>( &'life0 self, event_id: EventId, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn contains_blob<'life0, 'async_trait>( &'life0 self, blob_id: BlobId, ) -> Pin<Box<dyn Future<Output = Result<bool, ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn add_blobs<'life0, 'async_trait>( &'life0 self, blobs: impl 'async_trait + IntoIterator<Item = Blob> + Send, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn add_events<'life0, 'async_trait>( &'life0 self, events: impl 'async_trait + IntoIterator<Item = (EventId, Vec<u8>)> + Send, ) -> Pin<Box<dyn Future<Output = Result<(), ViewError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§