Initializersoto-core 7.4.0SotoCore
init(bytes:byteBufferAllocator:)
AWSHTTPBody.swift:38init(bytes: some Collection<UInt8>, byteBufferAllocator: ByteBufferAllocator = .init())
init(bytes: some Collection<UInt8>, byteBufferAllocator: ByteBufferAllocator = .init())
s8SotoCore11AWSHTTPBodyV5bytes19byteBufferAllocatorACx_7NIOCore04BytefG0VtcSlRzs5UInt8V7ElementRtzlufc
What are these?3JY8P
import SotoCore
struct AWSHTTPBody
Storage for HTTP body which can be either a ByteBuffer or an AsyncSequence of ByteBuffers
protocol Collection<Element> : Sequence
A sequence whose elements can be traversed multiple times, nondestructively, and accessed by an indexed subscript.
@frozen struct UInt8
An 8-bit unsigned integer value type.
struct ByteBufferAllocator
The preferred allocator for ByteBuffer
values. The allocation strategy is opaque but is currently libc’s malloc
, realloc
and free
.
init()
init<BufferSequence>(asyncSequence: BufferSequence, length: Int?) where BufferSequence : Sendable, BufferSequence : AsyncSequence, BufferSequence.Element == ByteBuffer
init<BufferSequence>(asyncSequence: BufferSequence, length: Int?) where BufferSequence : Sendable, BufferSequence : AsyncSequence, BufferSequence.Element : Collection, BufferSequence.Element : Sendable, BufferSequence.Element.Element == UInt8
init(buffer: ByteBuffer)
init(from decoder: Decoder) throws
init(string: String, byteBufferAllocator: ByteBufferAllocator = .init())
var isEmpty: Bool { get }
var isStreaming: Bool { get }
var length: Int? { get }
func collect(upTo length: Int) async throws -> ByteBuffer
func encode(to encoder: Encoder) throws
func makeAsyncIterator() -> AsyncIterator
typealias AsyncIterator = AnyAsyncSequence<ByteBuffer>.AsyncIterator
typealias Element = ByteBuffer