IntegerLength
All possible values for how many bytes a QUIC encoded integer can be
enum IntegerLength
All possible values for how many bytes a QUIC encoded integer can be
enum IntegerLength
s7NIOCore10ByteBufferV26QUICBinaryEncodingStrategyV13IntegerLengthO
What are these?9R7GP
import NIOCore
The core abstractions that make up SwiftNIO.
struct QUICBinaryEncodingStrategy
A NIOBinaryIntegerEncodingStrategy
which encodes bytes as defined in RFC 9000 § 16
struct ByteBuffer
ByteBuffer
stores contiguously allocated raw bytes. It is a random and sequential accessible sequence of zero or more bytes (octets).
case one
case two
case four
case eight
init(requiredBytesHint: IntegerLength)
Note: Prefer to use the APIs directly on ByteBuffer such as writeEncodedInteger(_:strategy:)
and pass .quic
rather than directly initialising an instance of this strategy
static func bytesNeededForInteger<IntegerType>(_ integer: IntegerType) -> Int where IntegerType : FixedWidthInteger
Calculates the minimum number of bytes needed to encode an integer using this strategy
var requiredBytesHint: Int
An estimate of the bytes required to write integers using this strategy
func readInteger<IntegerType>(as: IntegerType.Type, from buffer: inout ByteBuffer) -> IntegerType? where IntegerType : FixedWidthInteger
func writeInteger<IntegerType>(_ integer: IntegerType, reservedCapacity: Int, to buffer: inout ByteBuffer) -> Int where IntegerType : FixedWidthInteger
func writeInteger<IntegerType>(_ integer: IntegerType, to buffer: inout ByteBuffer) -> Int where IntegerType : FixedWidthInteger
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(rawValue: Int)
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)