Skip to main content

module_path

Function module_path 

Source
pub fn module_path(file_path: &str) -> ByteString
Expand description

Generates a Rust module path from the given source file path.

The path is resolved relative to the crate directory (the parent of src), e.g. /p/my-crate/src/net/io.rs becomes my_crate::net::io.