Function writeSliceForwards [src]
Write bytes into the ring buffer. Returns error.Full if the ring
buffer does not have enough space, without writing any data.
Uses copyForwards and can write slices from this RingBuffer into itself.
Prototype
pub fn writeSliceForwards(self: *RingBuffer, bytes: []const u8) Error!void
Parameters
self: *RingBuffer
bytes: []const u8
Possible Errors
Source
pub fn writeSliceForwards(self: *RingBuffer, bytes: []const u8) Error!void {
if (self.len() + bytes.len > self.data.len) return error.Full;
self.writeSliceForwardsAssumeCapacity(bytes);
}