Function module_name_from_file

Source
fn module_name_from_file(file_path: &Path) -> Result<String>
Expand description

Takes in the path to a Rust file and returns the path as you’d refer to it in a use-statement.

e.g. "relay/relay-event_schema/src/protocol/types.rs" -> "relay_event_schema::protocol".