Element
_TinyArray.swift:50typealias Element = Element
typealias Element = Element
import _CertificateInternals
struct _TinyArray<Element>
_TinyArray
is a RandomAccessCollection
optimised to store zero or one Element
. It supports arbitrary many elements but if only up to one Element
is stored it does not allocate separate storage on the heap and instead stores the Element
inline.
init()
init(_ elements: some Sequence<Result<Element, some Error>>) throws
init(_ elements: some Sequence<Element>)
init(arrayLiteral elements: Element...)
var endIndex: Int { get }
var startIndex: Int { get }
subscript(position: Int) -> Element { get set }
mutating func append(_ newElement: Element)
mutating func append(contentsOf newElements: some Sequence<Element>)
@discardableResult mutating func remove(at index: Int) -> Element
mutating func removeAll(where shouldBeRemoved: (Element) throws -> Bool) rethrows
mutating func sort(by areInIncreasingOrder: (Element, Element) throws -> Bool) rethrows
typealias Index = Int