isEqualTo(message:)
Helper to compare Message
s when not having a specific type to use normal Equatable
. Equatable
is provided with specific generated types.
func isEqualTo(message: any Message) -> Bool
Helper to compare Message
s when not having a specific type to use normal Equatable
. Equatable
is provided with specific generated types.
func isEqualTo(message: any Message) -> Bool
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
@preconcurrency protocol Message : CustomDebugStringConvertible, Sendable
The protocol which all generated protobuf messages implement. Message
is the protocol type you should use whenever you need an argument or variable which holds “some message”.
@frozen struct Bool
A value type whose instances are either true
or false
.
init()
Creates a new message with all of its fields initialized to their default values.
static var protoMessageName: String { get }
The fully-scoped name of the message from the original .proto file, including any relevant package name.
var isInitialized: Bool { get }
True if all required fields (if any) on this message and any nested messages (recursively) have values set; otherwise, false.
var unknownFields: UnknownStorage { get set }
Some formats include enough information to transport fields that were not known at generation time. When encountered, they are stored here.
mutating func decodeMessage<D>(decoder: inout D) throws where D : Decoder
Decode all of the fields from the given decoder.
func hash(into hasher: inout Hasher)
An implementation of hash(into:) to provide conformance with the Hashable
protocol.
func traverse<V>(visitor: inout V) throws where V : Visitor
Traverses the fields of the message, calling the appropriate methods of the passed Visitor
object.
func isEqualTo(message: any Message) -> Bool