hermes_cli_components/traits/bootstrap.rs
1use cgp::prelude::*;
2
3#[derive_component(BootstrapTypeComponent, ProvideBootstrapType<App>)]
4pub trait HasBootstrapType: Async {
5 type Bootstrap: Async;
6}
7
8#[derive_component(BootstrapLoaderComponent, BootstrapLoader<App>)]
9#[async_trait]
10pub trait CanLoadBootstrap<Args: Async>: HasBootstrapType + HasErrorType {
11 async fn load_bootstrap(&self, args: &Args) -> Result<Self::Bootstrap, Self::Error>;
12}