hasMark
Returns true if the buffer has been marked at all.
var hasMark: Bool { get }
Returns true if the buffer has been marked at all.
var hasMark: Bool { get }
import NIOCore
The core abstractions that make up SwiftNIO.
struct MarkedCircularBuffer<Element>
A circular buffer that allows one object at a time to be “marked” and easily identified and retrieved later.
@frozen struct Bool
A value type whose instances are either true
or false
.
init(initialCapacity: Int)
Create a new instance.
var count: Int { get }
The number of elements in the buffer.
var description: String { get }
var endIndex: Index { get }
var first: Element? { get }
The first element in the buffer.
var isEmpty: Bool { get }
If the buffer is empty.
var markedElement: Element? { get }
Returns the marked element.
var markedElementIndex: Index? { get }
Returns the index of the marked element.
var startIndex: Index { get }
subscript(bounds: Range<Index>) -> SubSequence { get set }
subscript(index: Index) -> Element { get set }
Retrieves the element at the given index from the buffer, without removing it.
mutating func append(_ value: Element)
Appends an entry to the buffer, expanding it if needed.
func distance(from start: Index, to end: Index) -> Int
func index(_ i: Index, offsetBy distance: Int) -> Index
func index(after i: Index) -> Index
func index(before i: Index) -> Index
func isMarked(index: Index) -> Bool
Returns true if the buffer is currently marked at the given index.
mutating func mark()
Marks the buffer at the current index, making the last index in the buffer marked.
mutating func popFirst() -> Element?
mutating func removeFirst() -> Element
Removes the first element from the buffer.
typealias Index = CircularBuffer<Element>.Index
typealias RangeType<Bound> = Range<Bound> where Bound : Strideable, Bound.Stride : SignedInteger
typealias SubSequence = CircularBuffer<Element>