pub trait ExecutionClientFactory:
Send
+ Sync
+ Debug {
// Required methods
fn create(
&self,
name: &str,
config: &dyn ClientConfig,
cache: Rc<RefCell<Cache>>,
clock: Rc<RefCell<dyn Clock>>,
) -> Result<Box<dyn ExecutionClient>>;
fn name(&self) -> &str;
fn config_type(&self) -> &str;
}
Expand description
Factory trait for creating execution client instances.
Implementations of this trait should create specific execution client types (e.g., Binance, Bybit, Interactive Brokers) based on the provided configuration.
Required Methods§
Sourcefn create(
&self,
name: &str,
config: &dyn ClientConfig,
cache: Rc<RefCell<Cache>>,
clock: Rc<RefCell<dyn Clock>>,
) -> Result<Box<dyn ExecutionClient>>
fn create( &self, name: &str, config: &dyn ClientConfig, cache: Rc<RefCell<Cache>>, clock: Rc<RefCell<dyn Clock>>, ) -> Result<Box<dyn ExecutionClient>>
Sourcefn config_type(&self) -> &str
fn config_type(&self) -> &str
Returns the supported configuration type name for this factory.