linera_execution::test_utils

Trait RegisterMockApplication

Source
pub trait RegisterMockApplication {
    // Required methods
    fn creator_chain_id(&self) -> ChainId;
    async fn register_mock_application_with(
        &mut self,
        description: ApplicationDescription,
        contract: Blob,
        service: Blob,
    ) -> Result<(ApplicationId, MockApplication)>;

    // Provided method
    async fn register_mock_application(
        &mut self,
        index: u32,
    ) -> Result<(ApplicationId, MockApplication, [BlobId; 3])> { ... }
}
Expand description

Registration of MockApplications to use in tests.

Required Methods§

Source

fn creator_chain_id(&self) -> ChainId

Returns the chain to use for the creation of the application.

This is included in the mocked ApplicationId.

Source

async fn register_mock_application_with( &mut self, description: ApplicationDescription, contract: Blob, service: Blob, ) -> Result<(ApplicationId, MockApplication)>

Registers a new MockApplication associated with a ApplicationDescription and its bytecode Blobs.

Provided Methods§

Source

async fn register_mock_application( &mut self, index: u32, ) -> Result<(ApplicationId, MockApplication, [BlobId; 3])>

Registers a new MockApplication and returns it with the ApplicationId that was used for it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§