pub fn source(id_or_file: &str, name: Option<&str>) -> Result<SourceResult>Expand description
Return the full source text of one symbol.
id_or_file— either a symbol id (<lang>:<path>#<name>@<line>) or, whennameisSome, the path to the file containing the symbol.name— whenSome, look the symbol up by this name inid_or_file; whenNone, parseid_or_fileas a full symbol id.
Returns a SourceResult with the chosen symbol’s source plus any
other_candidates that shared the name (for disambiguation). The @<line>
suffix of an id selects among duplicates; otherwise the first definition wins.
Errors on a malformed id or when no matching definition exists.