Instance Methodswift-openapi-runtime 1.6.0OpenAPIRuntime
hash(into:)
Hashes the HTTPBody instance by combining its object identifier into the provided hasher.
HTTPBody.swift:227func hash(into hasher: inout Hasher)
Parameters
- hasher
The hasher used to combine the hash value.
Other members in extension
Types
struct Iterator
An async iterator of both input async sequences and of the body itself.
enum Length
Describes the total length of the body, in bytes, if known.
Typealiases
typealias ArrayLiteralElement
Element type for array literals.
typealias AsyncIterator
Represents an asynchronous iterator over a sequence of elements.
typealias ByteChunk
The underlying byte chunk type.
typealias Element
Represents a single element within an asynchronous sequence
Type members
init(
) Creates a new empty body.
init(Data
) Creates a new body from the provided data chunk.
init([UInt8]
) Creates a new body from the provided array of bytes.
init(ByteChunk
) Creates a new body with the provided byte chunk.
init(some Collection<UInt8> & Sendable
) Creates a new body with the provided byte collection.
init(some StringProtocol & Sendable
) Creates a new body with the provided string encoded as UTF-8 bytes.
init(AsyncStream<ByteChunk>, length: HTTPBody.Length
) Creates a new body with the provided async stream.
init(AsyncStream<some StringProtocol & Sendable>, length: HTTPBody.Length
) Creates a new body with the provided async stream of strings.
init(AsyncThrowingStream<ByteChunk, any Error>, length: HTTPBody.Length
) Creates a new body with the provided async throwing stream.
init(AsyncThrowingStream<some StringProtocol & Sendable, any Error & Sendable>, length: HTTPBody.Length
) Creates a new body with the provided async throwing stream of strings.
init(ByteChunk, length: Length
) Creates a new body with the provided byte chunk.
init(some Collection<UInt8> & Sendable, length: Length
) Creates a new body with the provided byte collection.
init(some StringProtocol & Sendable, length: Length
) Creates a new body with the provided string encoded as UTF-8 bytes.
init(some Sequence<UInt8> & Sendable, length: Length, iterationBehavior: OpenAPIRuntime.IterationBehavior
) Creates a new body with the provided byte sequence.
init<Bytes>(Bytes, length: HTTPBody.Length, iterationBehavior: OpenAPIRuntime.IterationBehavior
) Creates a new body with the provided async sequence.
init<Bytes>(Bytes, length: HTTPBody.Length, iterationBehavior: OpenAPIRuntime.IterationBehavior
) Creates a new body with the provided async sequence of byte sequences.
init<Strings>(Strings, length: HTTPBody.Length, iterationBehavior: OpenAPIRuntime.IterationBehavior
) Creates a new body with the provided async sequence of string chunks.
init(arrayLiteral: UInt8...
) Initializes an
HTTPBody
instance with a sequence ofUInt8
elements.init(stringLiteral: String
) Initializes an
HTTPBody
instance with the provided string value.static func == (lhs: HTTPBody, rhs: HTTPBody
) -> Bool Compares two HTTPBody instances for equality by comparing their object identifiers.
Instance members
let iterationBehavior: OpenAPIRuntime.IterationBehavior
The iteration behavior, which controls how many times the input sequence can be iterated.
let length: Length
The total length of the body, in bytes, if known.
func makeAsyncIterator(
) -> AsyncIterator Creates and returns an asynchronous iterator