structio 0.3.1
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 doarray!,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'deare unchanged.
Added
json::MAX_DEPTHandbeve::MAX_DEPTH, the nesting limit each reader enforces, re-exported at the module root. They were reachable only throughjson::parserandbeve::reader.
Nothing existing changed shape; a 0.3.0 declaration reads and writes exactly the bytes it did.