Function printVector [src]

Prototype

pub fn printVector( w: *Writer, comptime fmt: []const u8, options: std.fmt.Options, value: anytype, max_depth: usize, ) Error!void

Parameters

w: *Writerfmt: []const u8options: std.fmt.Optionsmax_depth: usize

Possible Errors

WriteFailed

See the Writer implementation for detailed diagnostics.

Source

pub fn printVector( w: *Writer, comptime fmt: []const u8, options: std.fmt.Options, value: anytype, max_depth: usize, ) Error!void { const len = @typeInfo(@TypeOf(value)).vector.len; if (max_depth == 0) return w.writeAll("{ ... }"); try w.writeAll("{ "); inline for (0..len) |i| { try w.printValue(fmt, options, value[i], max_depth - 1); if (i < len - 1) try w.writeAll(", "); } try w.writeAll(" }"); }