Function parameters
Parameters
Deprecated.
Functions
- Managed
- Deprecated.
- AlignedManaged
- Deprecated.
- Aligned
- A contiguous, growable list of arbitrarily aligned items in memory.
Source
Implementation
pub fn print(self: *Self, gpa: Allocator, comptime fmt: []const u8, args: anytype) error{OutOfMemory}!void {
comptime assert(T == u8);
try self.ensureUnusedCapacity(gpa, fmt.len);
var aw: std.Io.Writer.Allocating = .fromArrayList(gpa, self);
defer self.* = aw.toArrayList();
return aw.writer.print(fmt, args) catch |err| switch (err) {
error.WriteFailed => return error.OutOfMemory,
};
}