Skip to main content

read_with

Function read_with 

Source
pub fn read_with(path: impl AsRef<Path>, opts: &ReadOptions) -> Result<NirGraph>
Expand description

Read a NIR graph with an explicit decoded-allocation budget.

See ReadOptions for the exact charging rules. Use this entry point for untrusted files. Plain read is intentionally unbounded for trusted callers and backward compatibility.

§Errors

As read, plus NirError::ReadLimitExceeded when the next decoded allocation would cross opts.max_bytes.