sz_rust_sdk/lib.rs
1//! # Senzing Rust SDK
2//!
3//! This crate provides a Rust interface to the Senzing entity resolution engine.
4//! It follows the same patterns as other Senzing SDKs while leveraging Rust's
5//! type safety and zero-cost abstractions.
6//!
7//! ## Architecture
8//!
9//! The SDK is organized around the following core traits:
10//! - [`SzEnvironment`] - Main entry point and factory for other components
11//! - [`SzEngine`] - Core entity resolution operations
12//! - [`SzConfig`] - Configuration management
13//! - [`SzConfigManager`] - Configuration lifecycle management
14//! - [`SzDiagnostic`] - System diagnostics and monitoring
15//! - [`SzProduct`] - Version and license information
16//!
17//! ## Usage
18//!
19//! ```rust,no_run
20//! use sz_rust_sdk::prelude::*;
21//!
22//! // Initialize the Senzing environment with proper settings
23//! let settings = r#"{
24//! "PIPELINE": {
25//! "CONFIGPATH": "/etc/opt/senzing",
26//! "RESOURCEPATH": "/opt/senzing/er/resources",
27//! "SUPPORTPATH": "/opt/senzing/data"
28//! },
29//! "SQL": {
30//! "CONNECTION": "sqlite3://na:na@/tmp/G2C.db"
31//! }
32//! }"#;
33//! let env = SzEnvironmentCore::new("my-app", settings, false)?;
34//!
35//! // Get the engine instance
36//! let engine = env.get_engine()?;
37//!
38//! // Add a record for entity resolution
39//! let result = engine.add_record(
40//! "CUSTOMERS",
41//! "CUST001",
42//! r#"{"NAME_FULL": "John Smith", "EMAIL": "john@example.com"}"#,
43//! None
44//! )?;
45//!
46//! println!("Entity resolution result: {}", result);
47//! # Ok::<(), Box<dyn std::error::Error>>(())
48//! ```
49
50pub mod core;
51pub mod error;
52mod ffi; // Internal FFI module - not part of public API
53pub mod flags;
54pub mod traits;
55pub mod types;
56
57// Internal helpers module - only for examples and tests, not part of public API
58// Hidden from documentation but accessible for internal use
59#[doc(hidden)]
60pub mod helpers;
61
62pub use core::*;
63pub use error::*;
64pub use flags::*;
65pub use traits::*;
66pub use types::*;
67
68/// Prelude module for convenient imports
69pub mod prelude {
70 pub use crate::core::*;
71 pub use crate::error::*;
72 pub use crate::flags::*;
73 pub use crate::traits::*;
74 pub use crate::types::*;
75}