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.

    Internal.swift:30

    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