Skip to main content

resolve_symbol

Function resolve_symbol 

Source
pub fn resolve_symbol<'a>(
    known_symbols: impl Iterator<Item = &'a String>,
    query: &str,
    mode: &SymbolMatchMode,
) -> Result<String, GraphError>
Expand description

Resolve a symbol name against the set of known symbols using the requested match mode.

Returns:

  • Ok(name) when exactly one symbol matches.
  • Err(GraphError::SymbolNotFound) when no symbol matches.
  • Err(GraphError::MultipleCandidates) when more than one symbol matches.