StructureSwift5.9.0

    UnsafeMutableBufferPointer

    A nonowning collection interface to a buffer of mutable elements stored contiguously in memory.

    @frozen struct UnsafeMutableBufferPointer<Element>

    You can use an UnsafeMutableBufferPointer instance in low level operations to eliminate uniqueness checks and, in release mode, bounds checks. Bounds checks are always performed in debug mode.

    UnsafeMutableBufferPointer Semantics

    An UnsafeMutableBufferPointer instance is a view into memory and does not own the memory that it references. Copying a value of type UnsafeMutableBufferPointer does not copy the instances stored in the underlying memory. However, initializing another collection with an UnsafeMutableBufferPointer instance copies the instances out of the referenced memory and into the new collection.

    Citizens in Swift

    Conformances

    Members

    Features

    Available in Foundation

    where Element == UInt8

    Conformances

    • protocol ContiguousBytes

      Indicates that the conforming type is a contiguous collection of raw bytes whose underlying storage is directly accessible by withUnsafeBytes.

    Members