Expand description
Shared manifest-parsing helpers: bounded JSON/TOML/YAML nesting checks and depth-limited parsing used by every ecosystem’s manifest parser.
Enums§
- Checked
Toml Error - Error returned by
parse_toml_checked: eithercontentnests deeper thanMAX_TOML_NESTING_DEPTHortoml-spanitself rejects it as invalid syntax. - Dependency
Source - Dependency source location (shared across all ecosystems).
- Loading
State - Loading state for registry data fetching.
Constants§
- MAX_
JSON_ NESTING_ DEPTH - Maximum allowed nesting depth for JSON array/object recursion before
check_json_nesting_depthrejects the input. - MAX_
TOML_ NESTING_ DEPTH - Maximum allowed nesting depth for TOML table/array recursion before
check_toml_nesting_depthrejects the input. - MAX_
YAML_ EXPANDED_ BYTES - Maximum total byte weight
check_yaml_expansionallows a document to expand to (counting anchor/alias-driven duplication) before rejecting it. - MAX_
YAML_ NESTING_ DEPTH - Maximum allowed nesting depth for YAML block/flow recursion before
check_yaml_nesting_depthrejects the input.
Functions§
- check_
json_ nesting_ depth - Scans raw JSON bytes for
[/{nesting deeper thanmax_depth, before handing the bytes toserde_json::from_slice/from_str. - check_
toml_ nesting_ depth - Scans raw TOML text for table/array recursion deeper than
max_depth. - check_
yaml_ bounds - Runs
check_yaml_nesting_depthandcheck_yaml_expansionagainstcontent, converting either rejection into aDepsError::ParseErrorlabeled withfile_type. - check_
yaml_ expansion - Streams
contentthroughyaml-rust2’s own parser event stream and tallies the total bytes theYamlnodesYamlLoader::load_from_strwould allocate, rejecting once the tally exceedsmax_bytes. - check_
yaml_ nesting_ depth - Scans raw YAML text for block/flow recursion deeper than
max_depth. - json_
depth_ error_ message - Message text for a JSON payload rejected for nesting deeper than
MAX_JSON_NESTING_DEPTH. - looks_
like_ filesystem_ path - Whether
valuelooks like a local filesystem path reference in a manifest specifier. - parse_
json_ checked - Deserializes
bytesintoT, first rejecting payloads whose JSON nesting exceedsMAX_JSON_NESTING_DEPTH(see that constant’s doc for why). - parse_
toml_ checked - Parses
contentas TOML, first rejecting input whose nesting exceedsMAX_TOML_NESTING_DEPTH(see that constant’s doc for why). - yaml_
scalar_ string - Renders a scalar YAML node as a string regardless of whether it was quoted or bare.