Static Propertyswift-protobuf 1.28.1SwiftProtobuf
emptyData
A singleton instance of an empty data that is used by the generated code for default values. This is a performance enhancement to work around the fact that the Data
type in Swift involves a new heap allocation every time an empty instance is initialized, instead of sharing a common empty backing storage.
This declaration is deprecated: Internal.emptyData isn't used any longer in newer versions of the generator. Generate code with a version later than 1.10.2 to get performance improvements. See https://github.com/apple/swift-protobuf/pull/1028 for more information.
static let emptyData: Data
Other members in extension
Type members
static func areAllInitialized<K>([K : any Message]
) -> Bool Helper to loop over dictionary with values that are Messages to see if they are all initialized (see Message.isInitialized for what that means).
static func areAllInitialized([any Message]
) -> Bool Helper to loop over a list of Messages to see if they are all initialized (see Message.isInitialized for what that means).