1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Error types for directory traversal operations.
//!
//! This module defines the [`WalkError`] enum, which encapsulates all possible
//! failure states that can occur while walking a directory tree, including
//! standard operating system errors and logical filesystem violations like infinite loops.
use ;
/// Errors that can occur during a directory traversal.
///
/// This enum categorizes failures into low-level system I/O issues and
/// high-level recursive logic violations.
/// Integration with the standard Error trait.
///
/// This implementation allows [`WalkError`] to be used with error handling crates
/// (like `anyhow` or `thiserror`) and ensures compatibility with the broader
/// Rust error ecosystem.