pub trait RuntimeFactorsBuilder {
type Factors: RuntimeFactors;
type CliArgs: Args;
type RuntimeConfig: Into<<Self::Factors as RuntimeFactors>::RuntimeConfig>;
// Required method
fn build(
config: &FactorsConfig,
args: &Self::CliArgs,
) -> Result<(Self::Factors, Self::RuntimeConfig)>;
// Provided method
fn configure_app<U: Send + 'static>(
executor: &mut FactorsExecutor<Self::Factors, U>,
runtime_config: &Self::RuntimeConfig,
config: &FactorsConfig,
args: &Self::CliArgs,
) -> Result<()> { ... }
}Expand description
A builder for runtime factors.
Required Associated Types§
Sourcetype CliArgs: Args
type CliArgs: Args
CLI arguments not included in FactorsConfig needed to build the [RuntimeFactors].
Sourcetype RuntimeConfig: Into<<Self::Factors as RuntimeFactors>::RuntimeConfig>
type RuntimeConfig: Into<<Self::Factors as RuntimeFactors>::RuntimeConfig>
The wrapped runtime config type.
Required Methods§
Sourcefn build(
config: &FactorsConfig,
args: &Self::CliArgs,
) -> Result<(Self::Factors, Self::RuntimeConfig)>
fn build( config: &FactorsConfig, args: &Self::CliArgs, ) -> Result<(Self::Factors, Self::RuntimeConfig)>
Build the factors and runtime config from the given options.
Provided Methods§
Sourcefn configure_app<U: Send + 'static>(
executor: &mut FactorsExecutor<Self::Factors, U>,
runtime_config: &Self::RuntimeConfig,
config: &FactorsConfig,
args: &Self::CliArgs,
) -> Result<()>
fn configure_app<U: Send + 'static>( executor: &mut FactorsExecutor<Self::Factors, U>, runtime_config: &Self::RuntimeConfig, config: &FactorsConfig, args: &Self::CliArgs, ) -> Result<()>
Configure the factors in the executor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".