Skip to main content

parse_selector

Function parse_selector 

Source
pub fn parse_selector(input: &str) -> Result<ParsedSelector, String>
Expand description

Parse a selector string of the form file_path::[kind ]name.

The :: separates the file path from the symbol expression. After ::, an optional kind prefix (fn, struct, etc.) may appear, followed by the symbol name. Trailing () is stripped from function names.

ยงErrors

Returns an error string if the input is missing ::, has an empty file path, or has an empty symbol name.