mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-25 07:33:12 +00:00
23 lines
615 B
Rust
23 lines
615 B
Rust
|
|
use async_trait::async_trait;
|
||
|
|
|
||
|
|
use crate::{
|
||
|
|
scenario::{DynError, FeedRuntime},
|
||
|
|
topology::DeploymentDescriptor,
|
||
|
|
};
|
||
|
|
|
||
|
|
/// Bundles all backend-specific types used by the core scenario engine.
|
||
|
|
#[async_trait]
|
||
|
|
pub trait Application: Send + Sync + 'static {
|
||
|
|
type Deployment: DeploymentDescriptor + Clone + 'static;
|
||
|
|
|
||
|
|
type NodeClient: Clone + Send + Sync + 'static;
|
||
|
|
|
||
|
|
type NodeConfig: Clone + Send + Sync + 'static;
|
||
|
|
|
||
|
|
type FeedRuntime: FeedRuntime;
|
||
|
|
|
||
|
|
async fn prepare_feed(
|
||
|
|
client: Self::NodeClient,
|
||
|
|
) -> Result<(<Self::FeedRuntime as FeedRuntime>::Feed, Self::FeedRuntime), DynError>;
|
||
|
|
}
|