optify 1.3.2

Simplifies getting the right configuration options for a process using pre-loaded configurations from files (JSON, YAML, etc.) to manage options for experiments or flights. This library is mainly made to support building implementations for other languages such as Node.js, Python, and Ruby. It is not meant to be consumed directly yet.
Documentation
use crate::{
    configurable_values::locator::ConfigurableValuePointers,
    provider::SourceValue,
    schema::{conditions::ConditionExpression, metadata::OptionsMetadata},
};

#[allow(clippy::large_enum_variant)]
pub(crate) enum LoadingResult {
    Feature(FeatureLoadingResult),
    Raw(RawLoadingResult),
}

/// The result of loading a feature configuration file.
pub(crate) struct FeatureLoadingResult {
    pub canonical_feature_name: String,
    pub conditions: Option<ConditionExpression>,
    /// A list of file paths that are explicitly referenced within this feature's ConfigurableStrings.
    /// This is only populated if the builder enables tracking.
    pub configurable_string_files: Vec<String>,
    pub configurable_value_pointers: ConfigurableValuePointers,
    pub imports: Option<Vec<String>>,
    pub metadata: OptionsMetadata,
    pub source: SourceValue,
}

/// The result of loading a feature configuration file.
pub(crate) struct RawLoadingResult {
    pub contents: String,
    pub relative_path: String,
}