Instance Methodswift-nio 2.72.0NIOFoundationCompat->NIOCore
buffer(data:)
Create a fresh ByteBuffer
containing the bytes contained in the given Data
.
func buffer(data: Data) -> ByteBuffer
This will allocate a new ByteBuffer
with enough space to fit the bytes of the Data
and potentially some extra space using Swift’s default allocator.