willbe/entity/
files.rs

1/// Define a private namespace for all its items.
2#[ allow( clippy ::std_instead_of_alloc, clippy ::std_instead_of_core ) ]
3mod private
4{
5
6  use crate :: *;
7
8  use std ::
9  {
10  io,
11 };
12  use error ::
13  {
14  typed ::Error,
15 };
16
17  /// `PathError` enum represents errors when creating a `CrateDir` object.
18  #[ derive( Debug, Error ) ]
19  pub enum PathError
20  {
21  /// Indicates a validation error with a descriptive message.
22  #[ error( "Failed to create a `CrateDir` object due to `{0}`" ) ]
23  Validation( String ),
24  /// Try to read or write
25  #[ error( "IO operation failed. Details: {0}" ) ]
26  Io( #[ from ] io ::Error ),
27 }
28
29}
30
31//
32
33mod crate_dir;
34mod manifest_file;
35mod source_file;
36mod either;
37
38//
39
40crate ::mod_interface!
41{
42  exposed use super ::
43  {
44  crate_dir ::CrateDir,
45  manifest_file ::ManifestFile,
46  source_file ::
47  {
48   SourceFile,
49   Entries,
50   Sources,
51   // Items,
52 },
53  either ::EitherDirOrFile
54 };
55  exposed use PathError;
56}