//! Core types and traits for the cfgmatic configuration framework.
//!
//! This crate provides the foundational types and traits used across all
//! cfgmatic crates. It defines the common vocabulary for configuration management
//! including sources, changes, and the core configuration trait.
//!
//! # Features
//!
//! - **`default`**: Core types and sync traits
//! - **`async`**: Async trait definitions for async/await workflows
//!
//! # Quick Start
//!
//! ```
//! use cfgmatic_core::{Config, ConfigSource, Change, ChangeType};
//! use serde::{Deserialize, Serialize};
//!
//! #[derive(Debug, Clone, Deserialize, Serialize)]
//! struct MyAppConfig {
//!     host: String,
//!     port: u16,
//! }
//!
//! impl Config for MyAppConfig {
//!     fn merge(&mut self, other: Self) -> cfgmatic_core::Result<()> {
//!         // Custom merge logic
//!         self.host = other.host;
//!         self.port = other.port;
//!         Ok(())
//!     }
//! }
//! ```

#![warn(missing_docs)]
#![cfg_attr(feature = "async", allow(async_fn_in_trait))]

pub use change::{Change, ChangeSummary, ChangeType};
pub use config::Config;
pub use error::{Error, Result};
pub use source::ConfigSource;

#[cfg(feature = "async")]
pub use r#async::AsyncConfig;

mod change;
mod config;
mod error;
mod source;

#[cfg(feature = "async")]
mod r#async;
