This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function
Returns error.OutOfMemory on allocation failure, or error.ParseZon error if the ZON is invalid or can not be deserialized into type T.
When the parser returns error.ParseZon, it will also store a human readable explanation in diag if non null. If diag is not null, it must be initialized to .{}.
Asserts at compile time that the result type doesn't contain pointers. As such, the result doesn't need to be freed.
An allocator is still required for temporary allocations made during parsing.
Parses the given slice as ZON.
Returns
error.OutOfMemoryon allocation failure, orerror.ParseZonerror if the ZON is invalid or can not be deserialized into typeT.When the parser returns
error.ParseZon, it will also store a human readable explanation indiagif non null. If diag is not null, it must be initialized to.{}.Asserts at compile time that the result type doesn't contain pointers. As such, the result doesn't need to be freed.
An allocator is still required for temporary allocations made during parsing.