Skip to main content

find_top_level_model

Function find_top_level_model 

Source
fn find_top_level_model(
    body: &[u8],
) -> Result<Option<((usize, usize), String)>, SpliceError>
Expand description

Locate the top-level "model" string value: its byte span (excluding the quotes) and its content. Scans with a string/escape state machine so a "model" that is only a nested key or a value elsewhere is skipped.