writeWithUnsafeMutableBytes(_:)

    ByteBuffer-core.swift:710

    This declaration is deprecated: please use writeWithUnsafeMutableBytes(minimumWritableBytes:_:) instead to ensure sufficient write capacity.

    @discardableResult mutating func writeWithUnsafeMutableBytes(_ body: (UnsafeMutableRawBufferPointer) throws -> Int) rethrows -> Int

    Other members in extension

    Types

    Typealiases

    Show implementation details (2)

    Hide implementation details

    Type members

    Instance members

    Show obsolete interfaces (2)

    Hide obsolete interfaces

    • func clear(minimumCapacity: UInt32)

      Set both reader index and writer index to 0. This will reset the state of this ByteBuffer to the state of a freshly allocated one, if possible without allocations. This is the cheapest way to recycle a ByteBuffer for a new use-case.

    • func set(buffer: ByteBuffer, at: Int) -> Int

      Copy buffer’s readable bytes into this ByteBuffer starting at index. Does not move any of the reader or writer indices.