traverse(visitor:)
any.pb.swift:226func traverse<V>(visitor: inout V) throws where V : Visitor
func traverse<V>(visitor: inout V) throws where V : Visitor
s13SwiftProtobuf07Google_B4_AnyV8traverse7visitoryxz_tKAA7VisitorRzlF
What are these?2PIFQ
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
struct Google_Protobuf_Any
Any
contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.
protocol Visitor
This is the key interface used by the generated traverse()
methods used for serialization. It is implemented by each serialization protocol: Protobuf Binary, Protobuf Text, JSON, and the Hash encoder.
init()
init(message: any Message, partial: Bool = false, typePrefix: String = defaultAnyTypeURLPrefix) throws
Initialize an Any object from the provided message.
init(textFormatString: String, extensions: (any ExtensionMap)? = nil) throws
Creates a new Google_Protobuf_Any
by decoding the given string containing a serialized message in Protocol Buffer text format.
init(textFormatString: String, options: TextFormatDecodingOptions = TextFormatDecodingOptions(), extensions: (any ExtensionMap)? = nil) throws
Creates a new Google_Protobuf_Any
by decoding the given string containing a serialized message in Protocol Buffer text format.
static let _protobuf_nameMap: _NameMap
static let protoMessageName: String
static func messageType(forMessageName name: String) -> (any Message.Type)?
Returns the Message.Type expected for the given proto message name.
static func messageType(forTypeURL url: String) -> (any Message.Type)?
Returns the Message.Type expected for the given type URL.
@discardableResult static func register(messageType: any Message.Type) -> Bool
Register a message type so that Any objects can use them for decoding contents.
var typeURL: String { get set }
A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one “/” character. The last segment of the URL’s path must represent the fully qualified name of the type (as in path/google.protobuf.Duration
). The name should be in a canonical form (e.g., leading “.” is not accepted).
var unknownFields: UnknownStorage
var value: Data { get set }
Must be a valid serialized protocol buffer of the above specified type.
static func == (lhs: Google_Protobuf_Any, rhs: Google_Protobuf_Any) -> Bool
mutating func decodeMessage<D>(decoder: inout D) throws where D : Decoder
func hash(into hasher: inout Hasher)
func isA<M>(_ type: M.Type) -> Bool where M : Message
Returns true if this Google_Protobuf_Any
message contains the given message type.