Skip to main content

parse_yaml

Function parse_yaml 

Source
pub fn parse_yaml(input: &str, budget: Budget) -> Result<bool, ScanError>
Expand description

Return true if the YAML exceeds any budget.

Parameters:

  • input: YAML text (UTF-8).
  • budget: limits to enforce.

Returns:

  • Ok(true) if a budget was exceeded (reject).
  • Ok(false) if within budget.
  • Err(ScanError) on parser error.

This only scans the parser event stream; it does not deserialize a YAML value.