Skip to main content

file_to_module_path

Function file_to_module_path 

Source
pub fn file_to_module_path(file_path: &str, src_dir: &Path) -> Vec<String>
Expand description

Converts a source file path to a module path within the crate.

§Examples

  • "src/lib.rs"[]
  • "src/blocking/client.rs"["blocking", "client"]
  • "src/fs.rs"["fs"]
  • "src/fs/mod.rs"["fs"]
  • "src/main.rs"[]