Trait SzEnvironment

Source
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§

Source

fn destroy(&mut self) -> SzResult<()>

Destroys the environment and releases all resources

Source

fn is_destroyed(&self) -> bool

Checks if the environment has been destroyed

Source

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

Source

fn get_active_config_id(&self) -> SzResult<ConfigId>

Gets the currently active configuration ID

Source

fn get_product(&self) -> SzResult<Box<dyn SzProduct>>

Gets the product interface instance

Source

fn get_engine(&self) -> SzResult<Box<dyn SzEngine>>

Gets the engine interface instance

Source

fn get_config_manager(&self) -> SzResult<Box<dyn SzConfigManager>>

Gets the configuration manager interface instance

Source

fn get_diagnostic(&self) -> SzResult<Box<dyn SzDiagnostic>>

Gets the diagnostic interface instance

Implementors§