sliding<T> static method

Buffer<T> sliding<T>([
  1. int limit = 10
])

Same as fixed but Overflow will insert the new message at the end and drop the oldest message in the buffer.

Omitting a limit value will result in a limit of 10.

Implementation

static Buffer<T> sliding<T>([int limit = 10]) {
  return _SlidingBuffer<T>(limit);
}