Skip to main content

sz_configtool_lib/functions/
candidate.rs

1//! Candidate function operations for Senzing configuration
2//!
3//! This module provides functions for managing candidate functions in CFG_RTYPE
4//! in the Senzing configuration JSON.
5//!
6//! Note: These are placeholder functions that will be implemented when the
7//! CLI command implementations are completed.
8
9use crate::error::SzConfigError;
10use serde_json::Value;
11
12/// Add a new candidate function (placeholder)
13pub fn add_candidate_function(
14    _config_json: &str,
15    _rtype_code: &str,
16    _candidate_func: &str,
17) -> Result<(String, Value), SzConfigError> {
18    Err(SzConfigError::not_implemented(
19        "Candidate functions are not yet fully implemented",
20    ))
21}
22
23/// Delete a candidate function (placeholder)
24pub fn delete_candidate_function(
25    _config_json: &str,
26    _rtype_code: &str,
27) -> Result<(String, Value), SzConfigError> {
28    Err(SzConfigError::not_implemented(
29        "Candidate functions are not yet fully implemented",
30    ))
31}
32
33/// Get a candidate function (placeholder)
34pub fn get_candidate_function(
35    _config_json: &str,
36    _rtype_code: &str,
37) -> Result<Value, SzConfigError> {
38    Err(SzConfigError::not_implemented(
39        "Candidate functions are not yet fully implemented",
40    ))
41}
42
43/// List all candidate functions (placeholder)
44pub fn list_candidate_functions(_config_json: &str) -> Result<Vec<Value>, SzConfigError> {
45    Err(SzConfigError::not_implemented(
46        "Candidate functions are not yet fully implemented",
47    ))
48}
49
50/// Set (update) a candidate function (placeholder)
51pub fn set_candidate_function(
52    _config_json: &str,
53    _rtype_code: &str,
54    _candidate_func: Option<&str>,
55) -> Result<(String, Value), SzConfigError> {
56    Err(SzConfigError::not_implemented(
57        "Candidate functions are not yet fully implemented",
58    ))
59}
60
61/// Remove a candidate function (placeholder)
62pub fn remove_candidate_function(
63    _config_json: &str,
64    _rtype_code: &str,
65) -> Result<(String, Value), SzConfigError> {
66    Err(SzConfigError::not_implemented(
67        "Candidate functions are not yet fully implemented",
68    ))
69}