pub trait DataClientFactory:
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 DataClient>>;
fn name(&self) -> &str;
fn config_type(&self) -> &str;
}
Expand description
Factory trait for creating data client instances.
Implementations of this trait should create specific data client types (e.g., Binance, Bybit, Databento) 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 DataClient>>
fn create( &self, name: &str, config: &dyn ClientConfig, cache: Rc<RefCell<Cache>>, clock: Rc<RefCell<dyn Clock>>, ) -> Result<Box<dyn DataClient>>
Sourcefn config_type(&self) -> &str
fn config_type(&self) -> &str
Returns the supported configuration type name for this factory.