Instance Subscriptswift-nio 2.84.0NIOCore

subscript(_:)

Accesses the element at the specified index.

CircularBuffer.swift:152
subscript(position: CircularBuffer<Element>.Index) -> Element { get set }

Parameters

position

The position of the element to access. position must be a valid index of the collection that is not equal to the endIndex property.

You can subscript CircularBuffer with any valid index other than the CircularBuffer‘s end index. The end index refers to the position one past the last element of a collection, so it doesn’t correspond with an element.