StructureSwift5.9.0

    ContiguousArray

    A contiguously stored array.

    @frozen struct ContiguousArray<Element>

    The ContiguousArray type is a specialized array that always stores its elements in a contiguous region of memory. This contrasts with Array, which can store its elements in either a contiguous region of memory or an NSArray instance if its Element type is a class or @objc protocol.

    If your array’s Element type is a class or @objc protocol and you do not need to bridge the array to NSArray or pass the array to Objective-C APIs, using ContiguousArray may be more efficient and have more predictable performance than Array. If the array’s Element type is a struct or enumeration, Array and ContiguousArray should have similar efficiency.

    For more information about using arrays, see Array and ArraySlice, with which ContiguousArray shares most properties and methods.

    Citizens in Swift

    Conformances

    Members

    Features

    Citizens in Swift

    where Element:Equatable

    Conformances

    Members

    Features

    Citizens in Swift

    where Element:Decodable

    Conformances

    Members

    Citizens in Swift

    where Element:Encodable

    Conformances

    Members

    Citizens in Swift

    where Element:Hashable

    Conformances

    • protocol Hashable

      A type that can be hashed into a Hasher to produce an integer hash value.

    Members

    Citizens in Swift

    where Element:Sendable

    Conformances

    • protocol Sendable

      A type whose values can safely be passed across concurrency domains by copying.

    Available in Foundation

    where Element == UInt8

    Conformances

    Members

    Features