Static Methodpackage-distributed-system 28.0.1DistributedSystem
decode(_:as:)
Decode value from the buffer
ULEB128.swift:52static func decode<T>(_ src: UnsafeRawBufferPointer, as: T.Type) throws -> (Int, T) where T : UnsignedInteger
Parameters
- src
source buffer to decode value from
Returns
a tuple with a size and decoded value
Other members in extension
Type members
static func encode<T>(T, to: UnsafeMutableRawPointer
) -> Int Encode value to the destination buffer. The caller responsible to provide the buffer of a size enough to store the value
static func size<T>(T
) -> Int Return the number of bytes used to encode value.