Function appendLiteral [src]
Append a literal
Prototype
pub fn appendLiteral( self: *Self, allocator: Allocator, lit: u8, writer: anytype, ) !void
Parameters
self: *Self
allocator: Allocator
lit: u8
Source
pub fn appendLiteral(
self: *Self,
allocator: Allocator,
lit: u8,
writer: anytype,
) !void {
_ = writer;
if (self.len >= self.memlimit) {
return error.CorruptInput;
}
try self.buf.append(allocator, lit);
self.len += 1;
}