_ByteTransferStrategy
Controls how bytes are transferred between ByteBuffer and other storage types.
@usableFromInline enum _ByteTransferStrategyControls how bytes are transferred between ByteBuffer and other storage types.
@usableFromInline enum _ByteTransferStrategys7NIOCore10ByteBufferV11HummingbirdE01_B16TransferStrategyO What are these?7U5FBimport NIOCoreThe core abstractions that make up SwiftNIO.
import Hummingbirdstruct ByteBufferByteBuffer stores contiguously allocated raw bytes. It is a random and sequential accessible sequence of zero or more bytes (octets).
case copyForce a copy of the bytes.
case noCopyDo not copy the bytes if at all possible.
case automaticUse a heuristic to decide whether to copy the bytes or not.
@usableFromInline func _getData(at index0: Int, length: Int, byteTransferStrategy: ByteBuffer._ByteTransferStrategy) -> Data? Return length bytes starting at index and return the result as Data. This will not change the reader index. The selected bytes must be readable or else nil will be returned.
func _getJSONDecodable<T>(_ type: T.Type, decoder: JSONDecoder = JSONDecoder(), at index: Int, length: Int) throws -> T? where T : Decodable Attempts to decode the length bytes from index using the JSONDecoder decoder as T.
mutating func _readData(length: Int, byteTransferStrategy: ByteBuffer._ByteTransferStrategy) -> Data? Read length bytes off this ByteBuffer, move the reader index forward by length bytes and return the result as Data.
func response(from request: Request, context: some RequestContext) -> Response Generate response holding bytebuffer
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.