Skip to main content

parse_cargo_toml_with_context

Function parse_cargo_toml_with_context 

Source
pub fn parse_cargo_toml_with_context(
    content: &str,
    doc_uri: &Uri,
    ctx: &CargoParseContext,
) -> Result<ParseResult>
Expand description

parse_cargo_toml, but threading ctx through to alternate-registry resolution.

The real entry point; parse_cargo_toml delegates here with a fresh, default context (mirrors this module’s own resolve/resolve_with_env and cargo_home_config_path/_with_env pattern), so every pre-existing test/doctest call site keeps compiling unchanged.

§Errors

Returns an error if:

  • TOML syntax is invalid
  • File path cannot be converted from URL