Function writeAssumeCapacity [src]

Write byte into the ring buffer. If the ring buffer is full, the oldest byte is overwritten.

Prototype

pub fn writeAssumeCapacity(self: *RingBuffer, byte: u8) void

Parameters

self: *RingBufferbyte: u8

Source

pub fn writeAssumeCapacity(self: *RingBuffer, byte: u8) void { self.data[self.mask(self.write_index)] = byte; self.write_index = self.mask2(self.write_index + 1); }