Expand description
Sync provider abstraction for file synchronization operations.
This module defines the SyncProvider trait that allows different types of
file synchronization (ignore files, codeowners, cubes, CI workflows) to be
implemented in their respective crates and used uniformly by the CLI.
§Architecture
Each sync provider crate (cuenv-ignore, cuenv-codeowners, etc.) implements
the SyncProvider trait. The CLI loads the CUE module once and passes it
to providers, avoiding redundant evaluation.
§Example
ⓘ
use cuenv_core::sync::{SyncProvider, SyncOptions, SyncContext};
// CLI loads module once
let module = load_module(&cwd, package)?;
// Pass to each provider
for provider in providers {
let result = provider.sync(&SyncContext {
module: &module,
options: &options,
}).await?;
}Structs§
- Sync
Context - Context for sync operations.
- Sync
Options - Options passed to sync operations.
- Sync
Result - Result of a sync operation.
Enums§
- Sync
Mode - Mode of operation for sync commands.
Traits§
- Sync
Provider - Trait for sync providers.