Returns whether the given position is within the bounds of the buffer.
bool contains(Pos pos) => bounds.contains(pos);