#[non_exhaustive]pub enum TreeError {
ManifestNotFound(PathBuf),
ManifestRead(String),
ManifestParse {
path: PathBuf,
detail: String,
},
Git(GitError),
CycleDetected {
chain: Vec<String>,
},
PackNameMismatch {
got: String,
expected: String,
path: PathBuf,
},
ChildPathInvalid {
child_name: String,
path: String,
reason: String,
},
}Expand description
Errors raised during a pack-tree walk.
Marked #[non_exhaustive] so later slices (credentials, submodules,
partial walks) can add variants without breaking consumers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ManifestNotFound(PathBuf)
The walker expected a pack.yaml at the given location but could not
find one (or its enclosing .grex/ directory was missing).
ManifestRead(String)
The manifest file existed but could not be read from disk.
ManifestParse
The manifest file was read but did not parse as a valid pack.yaml.
Fields
Git(GitError)
A git operation (clone, fetch, checkout, …) failed while hydrating a
child pack. The underlying GitError is preserved in full.
CycleDetected
A cycle was detected during the walk. chain lists the pack URLs (or
paths for the root) from the outermost pack down to the recurrence.
PackNameMismatch
A cloned child’s pack.yaml declared a name that does not match
what the parent pack expected for that children: entry.
Fields
ChildPathInvalid
A children[].path (or URL-derived tail) violated the bare-name
rule. Surfaced by the walker BEFORE any clone of the offending
child fires so a malicious path: ../escape in a parent pack
cannot materialise a directory outside the pack root. This is a
security boundary, not a soft validation concern — see
crates/grex-core/src/pack/validate/child_path.rs for the shared
rejection logic.
Trait Implementations§
Source§impl Error for TreeError
impl Error for TreeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()