Instance Methodswift-nio 2.74.0NIOCore
readInteger(as:from:)
ByteBuffer-quicBinaryEncodingStrategy.swift:36func readInteger<IntegerType>(as: IntegerType.Type, from buffer: inout ByteBuffer) -> IntegerType? where IntegerType : FixedWidthInteger
Other members in extension
Types
enum IntegerLength
All possible values for how many bytes a QUIC encoded integer can be
Type members
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 strategystatic func bytesNeededForInteger<IntegerType>(IntegerType
) -> Int Calculates the minimum number of bytes needed to encode an integer using this strategy
Instance members
var requiredBytesHint: Int
An estimate of the bytes required to write integers using this strategy
func writeInteger<IntegerType>(IntegerType, reservedCapacity: Int, to: inout ByteBuffer
) -> Int func writeInteger<IntegerType>(IntegerType, to: inout ByteBuffer
) -> Int