pub trait BrokerFactory {
// Required method
fn build(&self, config: &BrokerConfig) -> Box<dyn Broker>;
}Expand description
Builds the Broker a strategy trades against. The default,
DefaultBrokerFactory, produces the built-in bar-fill broker; a host can
supply its own to simulate against a different engine while still honouring
the script’s BrokerConfig.
Required Methods§
fn build(&self, config: &BrokerConfig) -> Box<dyn Broker>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".