Skip to main content

parse_content

Function parse_content 

Source
pub fn parse_content<T>(content: &str, path: PathBuf) -> Result<T, String>
where T: for<'doc> FromEure<'doc> + Send + Sync + 'static, for<'doc> <T as FromEure<'doc>>::Error: IntoErrorReports,
Expand description

Parse Eure content directly into a typed value.

This is a convenience function that creates a temporary query runtime, parses the content, and returns the result. Useful for simple parsing scenarios where you don’t need the full query infrastructure.

§Arguments

  • content - The Eure source content to parse
  • path - The path to use for error reporting

§Returns

  • Ok(T) - The parsed value
  • Err(String) - A formatted error message if parsing fails