Function sliceLast [src]
Returns a Slice for the last length bytes written to the ring buffer.
Does not check that any bytes have been written into the region.
Prototype
pub fn sliceLast(self: RingBuffer, length: usize) Slice
Parameters
self: RingBuffer
length: usize
Source
pub fn sliceLast(self: RingBuffer, length: usize) Slice {
return self.sliceAt(self.write_index + self.data.len - length, length);
}