Skip to main content

Crate module_path_extractor

Crate module_path_extractor 

Source

Functionsยง

find_module_path
Reads the file and extracts the module path at the given line.
find_module_path_in_file
Reads the file and extracts the module path at the given line, using a known module root.
get_pseudo_module_path
Gets the full pseudo-absolute module path of the current macro invocation.
get_source_info
Extracts the file path and line number where the macro was invoked.
module_path_from_file
Converts a file path into a pseudo-Rust module path.
module_path_from_file_with_root
Converts a file path into a pseudo-Rust module path using a known module root.
module_path_to_file
Maps a module path (e.g. crate::foo::bar) to a source file.
module_root_from_file
Derives a module root (usually <crate>/src) from a file path.