Skip to content

structio 0.3.1

Choose a tag to compare

@stephenberry stephenberry released this 03 Sep 12:17
· 50 commits to main since this release

Borrowing declarations accept any lifetime name, and the readers' nesting limit is exported.

[dependencies]
structio = "0.3"

Changed

  • A borrowing type names its lifetime as it likes. object!(['a] Borrowed<'a> { .. }) now works, as do array!, tagged_enum! and their single-format forms: the first lifetime in the bracket is the input lifetime, whatever it is called. It had to be spelled 'de, and any other name failed from inside the expansion with "lifetime may not live long enough" and no hint about why. Declarations written with 'de are unchanged.

Added

  • json::MAX_DEPTH and beve::MAX_DEPTH, the nesting limit each reader enforces, re-exported at the module root. They were reachable only through json::parser and beve::reader.

Nothing existing changed shape; a 0.3.0 declaration reads and writes exactly the bytes it did.