Zig 0.17.0-dev (Split by item)

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 library itself.

serialize

Serialize parameters into a PHC string.

Required field for params:

params can also include any additional parameters.

phc_encoding.serialize
pub fn serialize(params: anytype, str: []u8) Error![]const u8

File

lib/std/crypto/phc_encoding.zig:192

Code

pub fn serialize(params: anytype, str: []u8) Error![]const u8 {
    var w: Writer = .fixed(str);
    serializeTo(params, &w) catch return error.NoSpaceLeft;
    return w.buffered();
}