Crate sz_rust_sdk

Source
Expand description

§Senzing Rust SDK

This crate provides a Rust interface to the Senzing entity resolution engine. It follows the same patterns as other Senzing SDKs while leveraging Rust’s type safety and zero-cost abstractions.

§Architecture

The SDK is organized around the following core traits:

§Usage

use sz_rust_sdk::prelude::*;

// Initialize the Senzing environment with proper settings
let settings = r#"{
    "PIPELINE": {
        "CONFIGPATH": "/etc/opt/senzing",
        "RESOURCEPATH": "/opt/senzing/er/resources",
        "SUPPORTPATH": "/opt/senzing/data"
    },
    "SQL": {
        "CONNECTION": "sqlite3://na:na@/tmp/G2C.db"
    }
}"#;
let env = SzEnvironmentCore::new("my-app", settings, false)?;

// Get the engine instance
let engine = env.get_engine()?;

// Add a record for entity resolution
let result = engine.add_record(
    "CUSTOMERS",
    "CUST001",
    r#"{"NAME_FULL": "John Smith", "EMAIL": "john@example.com"}"#,
    None
)?;

println!("Entity resolution result: {}", result);

Re-exports§

pub use core::*;
pub use error::*;
pub use flags::*;
pub use traits::*;
pub use types::*;

Modules§

core
Core implementation structs for Senzing SDK interfaces
error
Error types for the Senzing Rust SDK
ffi 🔒
FFI bindings to the native Senzing library (Internal)
flags
Flag definitions for Senzing SDK operations
prelude
Prelude module for convenient imports
traits
Core traits defining the Senzing SDK interface
types
Common types and type aliases for the Senzing SDK