pub trait SimulatedExecutionClientFactory: Debug {
// Required methods
fn create(
&self,
name: &str,
config: &dyn ClientConfig,
cache: Rc<RefCell<Cache>>,
) -> Result<Box<dyn ExecutionClient>>;
fn name(&self) -> &str;
fn config_type(&self) -> &str;
}Expand description
Factory trait for simulated execution clients owned by the sync core.
Simulated execution clients may need the mutable cache handle because they host the matching engine and therefore own cache updates that a live venue adapter must not perform.
Required Methods§
Sourcefn create(
&self,
name: &str,
config: &dyn ClientConfig,
cache: Rc<RefCell<Cache>>,
) -> Result<Box<dyn ExecutionClient>>
fn create( &self, name: &str, config: &dyn ClientConfig, cache: Rc<RefCell<Cache>>, ) -> Result<Box<dyn ExecutionClient>>
Create a new simulated execution client instance.
§Errors
Returns an error if client creation fails.
Sourcefn config_type(&self) -> &str
fn config_type(&self) -> &str
Returns the supported configuration type name for this factory.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".