pub trait SzEnvironment {
// Required methods
fn destroy(&mut self) -> SzResult<()>;
fn is_destroyed(&self) -> bool;
fn reinitialize(&self, config_id: ConfigId) -> SzResult<()>;
fn get_active_config_id(&self) -> SzResult<ConfigId>;
fn get_product(&self) -> SzResult<Box<dyn SzProduct>>;
fn get_engine(&self) -> SzResult<Box<dyn SzEngine>>;
fn get_config_manager(&self) -> SzResult<Box<dyn SzConfigManager>>;
fn get_diagnostic(&self) -> SzResult<Box<dyn SzDiagnostic>>;
}
Expand description
Main entry point and factory for Senzing SDK components
The SzEnvironment
trait provides the primary interface for initializing
the Senzing SDK and obtaining instances of other SDK components.
Required Methods§
Sourcefn is_destroyed(&self) -> bool
fn is_destroyed(&self) -> bool
Checks if the environment has been destroyed
Sourcefn reinitialize(&self, config_id: ConfigId) -> SzResult<()>
fn reinitialize(&self, config_id: ConfigId) -> SzResult<()>
Reinitializes the environment with a specific configuration Note: Sz_reinit is thread-safe, so this doesn’t require a mutable reference
Sourcefn get_active_config_id(&self) -> SzResult<ConfigId>
fn get_active_config_id(&self) -> SzResult<ConfigId>
Gets the currently active configuration ID
Sourcefn get_product(&self) -> SzResult<Box<dyn SzProduct>>
fn get_product(&self) -> SzResult<Box<dyn SzProduct>>
Gets the product interface instance
Sourcefn get_engine(&self) -> SzResult<Box<dyn SzEngine>>
fn get_engine(&self) -> SzResult<Box<dyn SzEngine>>
Gets the engine interface instance
Sourcefn get_config_manager(&self) -> SzResult<Box<dyn SzConfigManager>>
fn get_config_manager(&self) -> SzResult<Box<dyn SzConfigManager>>
Gets the configuration manager interface instance
Sourcefn get_diagnostic(&self) -> SzResult<Box<dyn SzDiagnostic>>
fn get_diagnostic(&self) -> SzResult<Box<dyn SzDiagnostic>>
Gets the diagnostic interface instance