Expand description
Core types and utilities for cuenv
This crate provides enhanced error handling with miette diagnostics, structured error reporting, and contextual information.
§Type-safe wrappers
This crate provides validated newtype wrappers for common domain types:
PackageDir- A validated directory path that must exist and be a directoryPackageName- A validated package name following CUE package naming rules
§Examples
use cuenv_core::{PackageDir, PackageName};
use std::path::Path;
// Validate a directory exists and is actually a directory
let pkg_dir = match PackageDir::try_from(Path::new(".")) {
Ok(dir) => dir,
Err(e) => {
eprintln!("Invalid directory: {}", e);
return;
}
};
// Validate a package name follows naming rules
let pkg_name = match PackageName::try_from("my-package") {
Ok(name) => name,
Err(e) => {
eprintln!("Invalid package name: {}", e);
return;
}
};Modules§
- cache
- ci
- config
- Configuration types for cuenv
- environment
- Environment management for cuenv
- hooks
- Hook execution system for cuenv
- manifest
- Root Project configuration type
- owners
- Code ownership configuration types for cuenv manifests.
- paths
- Centralized path management for cuenv data directories.
- secrets
- Secret and resolver types
- shell
- Shell type definitions and utilities for cuenv
- tasks
- Task execution and management module
Structs§
- Limits
- Configuration limits
- Package
Dir - A validated directory path that must exist and be a directory
- Package
Name - A validated CUE package name
Enums§
- Error
- Main error type for cuenv operations with enhanced diagnostics
- Package
DirError - Errors that can occur when validating a PackageDir
- Package
Name Error - Errors that can occur when validating a PackageName
Constants§
- VERSION
- Version of the
cuenv-corecrate (used by task cache metadata)
Type Aliases§
- Result
- Result type alias for cuenv operations