Noverberrain/configscope/core does not have a README file

    ConfigAuditIssue

    pub struct ConfigAuditIssue {
    path : ConfigPath
    kind : ConfigAuditIssueKind
    expected_kind : ConfigValueKind?
    actual_kind : ConfigValueKind?
    } derive(Eq,
    Debug
    )

    A single issue found while auditing a configuration value.

    ConfigAuditIssue::actual_kind

    Return the actual value kind for a type mismatch.

    Other issue categories return None.

    ConfigAuditIssue::expected_kind

    fn ConfigAuditIssue::expected_kind(self : ConfigAuditIssue) -> ConfigValueKind?

    Return the expected value kind for a type mismatch.

    Other issue categories return None.

    ConfigAuditIssue::kind

    Return the category of this audit issue.

    ConfigAuditIssue::message

    fn ConfigAuditIssue::message(self : ConfigAuditIssue) -> String

    Render a concise human-readable diagnostic for this audit issue.

    ConfigAuditIssue::path

    Return the path associated with this audit issue.

    ConfigAuditIssueKind

    pub(all) enum ConfigAuditIssueKind {
    MissingRequired
    TypeMismatch
    } derive(Eq,
    Debug
    )

    Describes why a configuration audit reported an issue.

    ConfigAuditIssueKind::to_string

    fn ConfigAuditIssueKind::to_string(self : ConfigAuditIssueKind) -> String

    Return a stable lowercase name for this audit issue category.

    ConfigAuditRule

    pub(all) enum ConfigAuditRule {
    Required(ConfigPath)
    TypeIs(ConfigPath, ConfigValueKind)
    } derive(Eq,
    Debug
    )

    A validation rule applied to a configuration value.

    Rules can require a path to exist or require an existing value to have a particular JSON-compatible kind.

    ConfigAuditRule::path

    Return the path inspected by this rule.

    ConfigAuditRule::required

    Create a rule that requires one configuration path to be present.

    ConfigAuditRule::type_is

    fn ConfigAuditRule::type_is(path : ConfigPath, expected_kind : ConfigValueKind) -> ConfigAuditRule

    Create a rule that requires an existing value to have a particular kind.

    ConfigCompatibilityBaseline

    pub struct ConfigCompatibilityBaseline {
    name : String
    value : ConfigValue
    } derive(Eq,
    Debug
    )

    A named historical configuration snapshot used as a compatibility baseline.

    ConfigCompatibilityBaseline::name

    Return the name associated with this baseline snapshot.

    ConfigCompatibilityBaseline::new

    Create a named compatibility baseline.

    ConfigCompatibilityChange

    pub struct ConfigCompatibilityChange {
    difference : ConfigDiff
    impact : ConfigCompatibilityImpact
    } derive(Eq,
    Debug
    )

    A configuration difference together with its compatibility impact.

    ConfigCompatibilityChange::after

    Return the later value, or None when the path was removed.

    ConfigCompatibilityChange::before

    Return the earlier value, or None when the path was added.

    ConfigCompatibilityChange::difference_kind

    Return the original difference category.

    ConfigCompatibilityChange::impact

    Return the compatibility impact assigned to this change.

    ConfigCompatibilityChange::message

    Render a concise description of the change.

    ConfigCompatibilityChange::path

    Return the path affected by this compatibility change.

    ConfigCompatibilityContract

    pub struct ConfigCompatibilityContract {
    candidate_path : String
    baseline_paths : Array[String]
    policy : ConfigCompatibilityPolicy
    } derive(Eq,
    Debug
    )

    A versioned compatibility check described by a JSON manifest.

    The manifest contains one candidate snapshot, at least one historical baseline snapshot, and an optional release gate. Paths are kept as supplied so callers can resolve them relative to the manifest file.

    ConfigCompatibilityContract::baseline_paths

    fn ConfigCompatibilityContract::baseline_paths(self : ConfigCompatibilityContract) -> Array[String]

    Return baseline snapshot paths in manifest order.

    ConfigCompatibilityContract::candidate_path

    fn ConfigCompatibilityContract::candidate_path(self : ConfigCompatibilityContract) -> String

    Return the candidate snapshot path from the manifest.

    ConfigCompatibilityContract::from_value

    fn ConfigCompatibilityContract::from_value(value : ConfigValue) -> Result[ConfigCompatibilityContract, String]

    Parse a compatibility contract from a JSON-compatible value.

    The accepted shape contains string field candidate, a non-empty string array field baselines, and an optional fail_on field. fail_on defaults to breaking. Unknown object fields are ignored so the manifest can grow without breaking older clients.

    ConfigCompatibilityContract::policy

    Return the release gate selected by the manifest.

    ConfigCompatibilityImpact

    pub(all) enum ConfigCompatibilityImpact {
    Compatible
    Behavioral
    Breaking
    } derive(Eq,
    Debug
    )

    Classifies the impact of a configuration change for version evolution.

    This baseline classification treats added paths as compatible, changed values as behavioral changes, and removed or type-changed paths as breaking changes. A later policy layer can refine these defaults with schema rules.

    ConfigCompatibilityImpact::to_string

    Return a stable lowercase name for a compatibility impact.

    ConfigCompatibilityMatrixEntry

    pub struct ConfigCompatibilityMatrixEntry {
    baseline_name : String
    report : ConfigCompatibilityReport
    } derive(Eq,
    Debug
    )

    One candidate-to-baseline result in a compatibility matrix.

    ConfigCompatibilityMatrixEntry::baseline_name

    Return the name of the historical baseline.

    ConfigCompatibilityMatrixEntry::passes

    Return whether this baseline passes the selected release policy.

    ConfigCompatibilityMatrixEntry::report

    Return the compatibility report for this baseline.

    ConfigCompatibilityMatrixEntry::violation_count

    Return the number of policy violations for this baseline.

    ConfigCompatibilityMatrixReport

    pub struct ConfigCompatibilityMatrixReport {
    entries : Array[ConfigCompatibilityMatrixEntry]
    } derive(Eq,
    Debug
    )

    The compatibility results for one candidate against multiple baselines.

    ConfigCompatibilityMatrixReport::baseline_count

    Return the number of baselines checked.

    ConfigCompatibilityMatrixReport::entries

    Return all matrix entries in the original baseline order.

    ConfigCompatibilityMatrixReport::entry

    Return one matrix entry in the original baseline order.

    ConfigCompatibilityMatrixReport::failed_count

    Return the number of baselines that violate the selected policy.

    ConfigCompatibilityMatrixReport::passed_count

    Return the number of baselines that pass the selected policy.

    ConfigCompatibilityMatrixReport::passes

    Return whether every baseline passes the selected policy.

    ConfigCompatibilityPolicy

    pub(all) enum ConfigCompatibilityPolicy {
    BreakingOnly
    NoBehavioralChanges
    NoChanges
    } derive(Eq,
    Debug
    )

    Selects which compatibility impacts should fail a release gate.

    BreakingOnly is the default and rejects only breaking changes. NoBehavioralChanges also rejects behavioral changes, while NoChanges requires the two snapshots to be identical.

    ConfigCompatibilityPolicy::to_string

    Return the stable command-line name for a compatibility policy.

    ConfigCompatibilityReport

    pub struct ConfigCompatibilityReport {
    changes : Array[ConfigCompatibilityChange]
    } derive(Eq,
    Debug
    )

    The compatibility result for an earlier and a later configuration value.

    ConfigCompatibilityReport::behavioral_count

    fn ConfigCompatibilityReport::behavioral_count(self : ConfigCompatibilityReport) -> Int

    Return the number of behavioral changes.

    ConfigCompatibilityReport::breaking_count

    fn ConfigCompatibilityReport::breaking_count(self : ConfigCompatibilityReport) -> Int

    Return the number of breaking changes.

    ConfigCompatibilityReport::change

    Return one change by its stable path order, or None when out of bounds.

    ConfigCompatibilityReport::change_count

    Return the total number of configuration changes.

    ConfigCompatibilityReport::changes

    Return all changes in stable path order.

    ConfigCompatibilityReport::compatible_count

    fn ConfigCompatibilityReport::compatible_count(self : ConfigCompatibilityReport) -> Int

    Return the number of compatible changes.

    ConfigCompatibilityReport::is_compatible

    fn ConfigCompatibilityReport::is_compatible(self : ConfigCompatibilityReport) -> Bool

    Return whether this report contains no breaking changes.

    ConfigCompatibilityReport::passes

    Return whether this report passes a release policy.

    ConfigCompatibilityReport::violation_count

    Return the number of changes that violate a release policy.

    ConfigConflict

    pub struct ConfigConflict {
    path : ConfigPath
    earlier_kind : ConfigValueKind
    later_kind : ConfigValueKind
    } derive(Eq,
    Debug
    )

    A path at which recursive merge encountered incompatible structures.

    ConfigConflict::earlier_kind

    fn ConfigConflict::earlier_kind(self : ConfigConflict) -> ConfigValueKind

    Return the kind supplied by the earlier configuration.

    ConfigConflict::later_kind

    Return the kind supplied by the later configuration.

    ConfigConflict::path

    Return the path where this conflict occurred.

    ConfigDiff

    pub struct ConfigDiff {
    path : ConfigPath
    kind : ConfigDiffKind
    before : ConfigValue?
    after : ConfigValue?
    } derive(Eq,
    Debug
    )

    A single difference between an earlier and a later configuration value.

    ConfigDiff::after

    fn ConfigDiff::after(self : ConfigDiff) -> ConfigValue?

    Return the later value, or None when the path was removed.

    ConfigDiff::before

    fn ConfigDiff::before(self : ConfigDiff) -> ConfigValue?

    Return the earlier value, or None when the path was added.

    ConfigDiff::kind

    Return the category of this difference.

    ConfigDiff::path

    fn ConfigDiff::path(self : ConfigDiff) -> ConfigPath

    Return the path at which this difference occurred.

    ConfigDiffKind

    pub(all) enum ConfigDiffKind {
    Added
    Removed
    Changed
    TypeChanged
    } derive(Eq,
    Debug
    )

    Describes how one configuration path differs between two values.

    ConfigDiffKind::to_string

    fn ConfigDiffKind::to_string(self : ConfigDiffKind) -> String

    Return a stable lowercase name for this difference category.

    ConfigExplanation

    pub struct ConfigExplanation {
    path : ConfigPath
    value : ConfigValue
    source : String
    } derive(Eq,
    Debug
    )

    A diagnostic view of one merged configuration field.

    The explanation combines the final value with the layer that supplied it.

    ConfigExplanation::kind

    Return the kind of the final value found at the explained path.

    ConfigExplanation::path

    Return the explained configuration path.

    ConfigExplanation::source

    fn ConfigExplanation::source(self : ConfigExplanation) -> String

    Return the name of the layer that supplied the final value.

    ConfigExplanation::value

    Return the final value found at the explained path.

    ConfigLayer

    pub struct ConfigLayer {
    name : String
    value : ConfigValue
    } derive(Eq,
    Debug
    )

    A named configuration source used by future layered merges.

    ConfigLayer::name

    fn ConfigLayer::name(self : ConfigLayer) -> String

    Return the source name associated with this layer.

    ConfigLayer::new

    fn ConfigLayer::new(name : String, value : ConfigValue) -> ConfigLayer

    Create a configuration layer with a source name and value.

    ConfigLayer::value

    fn ConfigLayer::value(self : ConfigLayer) -> ConfigValue

    Return the configuration value stored in this layer.

    ConfigPath

    pub struct ConfigPath {
    segments : Array[String]
    } derive(Eq,
    Debug
    )

    A dot-separated path that identifies one value in a configuration tree.

    The first version intentionally supports only simple paths such as server.port. Escaping dots inside key names will be added separately if the project later needs it.

    ConfigPath::length

    fn ConfigPath::length(self : ConfigPath) -> Int

    Return the number of segments in the path.

    ConfigPath::segment

    fn ConfigPath::segment(self : ConfigPath, index : Int) -> String?

    Return one segment, or None when the index is outside the path.

    ConfigPath::to_string

    fn ConfigPath::to_string(self : ConfigPath) -> String

    Convert the path back to its canonical dot-separated representation.

    ConfigPathError

    pub(all) enum ConfigPathError {
    EmptyPath
    EmptySegment(Int)
    } derive(Eq,
    Debug
    )

    Describes why a textual configuration path could not be parsed.

    ConfigPathError::to_string

    fn ConfigPathError::to_string(self : ConfigPathError) -> String

    Render a concise diagnostic for an invalid path.

    ConfigValue

    pub struct ConfigValue {
    raw : Json
    } derive(Eq,
    Debug
    )

    A JSON-compatible value used by ConfigScope's merge and analysis engine.

    The underlying representation is intentionally private. This keeps later merge and provenance work independent from the concrete JSON container.

    ConfigValue::array

    fn ConfigValue::array(values : Array[ConfigValue]) -> ConfigValue

    Construct an array configuration value.

    The input array is copied into the private representation.

    ConfigValue::as_boolean

    fn ConfigValue::as_boolean(self : ConfigValue) -> Bool?

    Return the boolean payload, or None for a different value kind.

    ConfigValue::as_number

    fn ConfigValue::as_number(self : ConfigValue) -> Double?

    Return the numeric payload, or None for a different value kind.

    ConfigValue::as_string

    fn ConfigValue::as_string(self : ConfigValue) -> String?

    Return the string payload, or None for a different value kind.

    ConfigValue::audit

    Apply validation rules to this configuration value.

    Required paths count as present even when their value is null. Type rules only inspect paths that exist, allowing a separate required rule to control missing-path diagnostics. Issues are ordered lexicographically by path so diagnostics remain deterministic.

    ConfigValue::boolean

    fn ConfigValue::boolean(value : Bool) -> ConfigValue

    Construct a boolean configuration value.

    ConfigValue::compatibility_matrix

    Compare a candidate snapshot against multiple historical baselines.

    The receiver is the later candidate snapshot. Each baseline is compared to it in baseline-to-candidate order, and entries retain the input order.

    ConfigValue::compatibility_with

    fn ConfigValue::compatibility_with(self : ConfigValue, later : ConfigValue) -> ConfigCompatibilityReport

    Compare two configuration snapshots for version compatibility.

    This API intentionally compares already materialized JSON-compatible values. It does not parse configuration files or merge runtime layers. Differences retain the deterministic path order of ConfigValue::diff.

    ConfigValue::contains_field

    fn ConfigValue::contains_field(self : ConfigValue, key : String) -> Bool

    Return whether an object contains a field with the given key.

    ConfigValue::deep_merge

    fn ConfigValue::deep_merge(self : ConfigValue, later : ConfigValue) -> ConfigValue

    Recursively merge two configuration values, with the later value winning.

    Nested objects preserve fields from both inputs. A later scalar, array, or type change replaces the earlier value at that field.

    ConfigValue::deep_merge_with_report

    fn ConfigValue::deep_merge_with_report(self : ConfigValue, later : ConfigValue) -> MergeResult

    Describe a recursive merge together with structural type conflicts.

    ConfigValue::diff

    fn ConfigValue::diff(self : ConfigValue, later : ConfigValue) -> Array[ConfigDiff]

    Compare this configuration with a later value.

    Object fields are compared recursively. Added and removed object fields are reported as one difference for the whole field. Arrays are compared as whole values in this first diff implementation. Results are ordered by path.

    ConfigValue::element

    fn ConfigValue::element(self : ConfigValue, index : Int) -> ConfigValue?

    Read one array element, or None if this is not an array or the index is outside its bounds.

    ConfigValue::empty_object

    fn ConfigValue::empty_object() -> ConfigValue

    Construct an empty object configuration value.

    ConfigValue::field

    fn ConfigValue::field(self : ConfigValue, key : String) -> ConfigValue?

    Read one object field, or None if this is not an object or the key is absent.

    ConfigValue::get

    fn ConfigValue::get(self : ConfigValue, path : ConfigPath) -> ConfigValue?

    Read a nested value using a dot-separated configuration path.

    The lookup succeeds only when every path segment selects an object field. Arrays are intentionally not indexed by this first path API.

    ConfigValue::kind

    Return the kind of this value.

    ConfigValue::length

    fn ConfigValue::length(self : ConfigValue) -> Int?

    Return the number of elements for an array or fields for an object. Scalar values return None.

    ConfigValue::merge

    fn ConfigValue::merge(self : ConfigValue, later : ConfigValue) -> ConfigValue

    Merge an earlier configuration value with a later override.

    Object fields are combined at the current level, and fields from the override replace fields with the same key. Nested objects are replaced as whole values; recursive merging will be added separately.

    ConfigValue::null

    fn ConfigValue::null() -> ConfigValue

    Construct a null configuration value.

    ConfigValue::number

    fn ConfigValue::number(value : Double) -> ConfigValue

    Construct a numeric configuration value.

    ConfigValue::object

    fn ConfigValue::object(fields : Map[String, ConfigValue]) -> ConfigValue

    Construct an object configuration value.

    The input map is copied into the private representation, so later changes to the caller's map do not change the constructed value.

    ConfigValue::parse_json

    Parse a JSON text into a configuration value.

    The parser accepts every JSON value, including a root scalar or array.

    ConfigValue::redact

    fn ConfigValue::redact(self : ConfigValue, paths : Array[ConfigPath]) -> ConfigValue

    Replace selected configuration paths with a fixed redaction marker.

    Redaction matches complete paths only. The input value is not modified.

    ConfigValue::string

    fn ConfigValue::string(value : String) -> ConfigValue

    Construct a string configuration value.

    ConfigValue::to_json_string

    fn ConfigValue::to_json_string(self : ConfigValue) -> String

    Render this configuration value as compact JSON text.

    ConfigValueKind

    pub(all) enum ConfigValueKind {
    Null
    Boolean
    Number
    String
    Array
    Object
    } derive(Eq,
    Debug
    )

    The JSON-compatible kinds represented by a configuration value.

    ConfigValueKind::to_string

    fn ConfigValueKind::to_string(self : ConfigValueKind) -> String

    Return the stable lowercase name used in diagnostics and reports.

    LayeredConfig

    pub struct LayeredConfig {
    layers : Array[ConfigLayer]
    } derive(Eq,
    Debug
    )

    An ordered collection of named configuration layers.

    Layers are merged from first to last, so later layers have higher precedence.

    LayeredConfig::empty

    Return an empty ordered configuration.

    LayeredConfig::layer

    fn LayeredConfig::layer(self : LayeredConfig, index : Int) -> ConfigLayer?

    Return one layer by position, or None when the index is out of bounds.

    LayeredConfig::length

    fn LayeredConfig::length(self : LayeredConfig) -> Int

    Return the number of layers in this configuration.

    LayeredConfig::merge

    Merge all layers from first to last, or return None for no layers.

    LayeredConfig::merge_with_provenance

    fn LayeredConfig::merge_with_provenance(self : LayeredConfig) -> LayeredMergeResult?

    Merge all layers while retaining the source of each final configuration path.

    An empty configuration has no value to merge and returns None.

    LayeredConfig::merge_with_report

    fn LayeredConfig::merge_with_report(self : LayeredConfig) -> MergeResult?

    Merge all layers from first to last and report structural conflicts.

    An empty configuration has no value to merge and returns None.

    LayeredConfig::new

    Create an ordered configuration from the supplied layers.

    The input array is copied, so later changes to the caller's array do not change the layer ordering stored by this value.

    LayeredMergeResult

    pub struct LayeredMergeResult {
    value : ConfigValue
    conflicts : Array[ConfigConflict]
    sources : Map[String, String]
    } derive(Eq,
    Debug
    )

    The merged configuration together with the source of each final field.

    LayeredMergeResult::conflict

    fn LayeredMergeResult::conflict(self : LayeredMergeResult, index : Int) -> ConfigConflict?

    Return one structural conflict, or None when the index is out of bounds.

    LayeredMergeResult::conflict_count

    fn LayeredMergeResult::conflict_count(self : LayeredMergeResult) -> Int

    Return the number of structural conflicts found during the merge.

    LayeredMergeResult::explain

    Explain one final configuration field, or return None when the path is missing from the merged value or has no tracked source.

    LayeredMergeResult::source

    fn LayeredMergeResult::source(self : LayeredMergeResult, path : ConfigPath) -> String?

    Return the name of the layer that supplied the final value at a path.

    LayeredMergeResult::source_count

    fn LayeredMergeResult::source_count(self : LayeredMergeResult) -> Int

    Return the number of tracked configuration paths.

    LayeredMergeResult::value

    Return the merged configuration value.

    MergeResult

    pub struct MergeResult {
    value : ConfigValue
    conflicts : Array[ConfigConflict]
    } derive(Eq,
    Debug
    )

    The merged value and structural conflicts found while producing it.

    MergeResult::conflict

    fn MergeResult::conflict(self : MergeResult, index : Int) -> ConfigConflict?

    Return one structural conflict, or None when the index is out of bounds.

    MergeResult::conflict_count

    fn MergeResult::conflict_count(self : MergeResult) -> Int

    Return the number of structural conflicts found by the merge.

    MergeResult::value

    fn MergeResult::value(self : MergeResult) -> ConfigValue

    Return the value produced by the reported merge.

    parse_path

    fn parse_path(source : String) -> Result[ConfigPath, ConfigPathError]

    Parse a simple dot-separated configuration path.

    Empty paths and empty segments are rejected, so .server, server..port, and server. are invalid.