Required Instance Propertyswift-protobuf 1.29.0SwiftProtobuf
count
The number of bytes in the bag of bytes.
var count: Int { get }
The number of bytes in the bag of bytes.
var count: Int { get }
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
protocol SwiftProtobufContiguousBytes
Conformance to this protocol gives users a way to provide their own “bag of bytes” types to be used for serialization and deserialization of protobufs. It provides a general interface for bytes since the Swift Standard Library currently does not provide such a protocol.
@frozen struct Int
A signed integer value type.
init<S>(_ sequence: S) where S : Sequence, S.Element == UInt8
An initializer for a bag of bytes type, given a sequence of bytes.
init(repeating: UInt8, count: Int)
An initializer for a bag of bytes type.
func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
Calls the given closure with the contents of underlying storage.
mutating func withUnsafeMutableBytes<R>(_ body: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R
Calls the given closure with the contents of underlying storage.