Initializersoto-core 7.4.0SotoCore
init(string:byteBufferAllocator:)
AWSHTTPBody.swift:44init(string: String, byteBufferAllocator: ByteBufferAllocator = .init())
init(string: String, byteBufferAllocator: ByteBufferAllocator = .init())
s8SotoCore11AWSHTTPBodyV6string19byteBufferAllocatorACSS_7NIOCore04BytefG0Vtcfc
What are these?71YTE
import SotoCore
struct AWSHTTPBody
Storage for HTTP body which can be either a ByteBuffer or an AsyncSequence of ByteBuffers
@frozen struct String
A Unicode string value that is a collection of characters.
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(bytes: some Collection<UInt8>, byteBufferAllocator: ByteBufferAllocator = .init())
init(from decoder: Decoder) throws
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