run_parser_test_suite

Function unsafe_main

Source
pub(crate) unsafe fn unsafe_main(
    stdin: &mut dyn Read,
    stdout: &mut dyn Write,
) -> Result<()>
Expand description

The main parsing function that processes YAML input and writes formatted output.

§Safety

This function is unsafe because it deals with raw pointers and FFI. Callers must ensure that the provided stdin and stdout are valid and that the FFI calls are used correctly.

§Arguments

  • stdin - A mutable reference to a type that implements Read, from which YAML will be read.
  • stdout - A mutable reference to a type that implements Write, to which formatted output will be written.

§Returns

Returns Ok(()) if parsing and formatting succeed, or an Error if any issues occur.