Instance Methodswift-protobuf 1.28.1SwiftProtobuf
isValid(for:)
Checks whether the given FieldMask is valid for type M.
Google_Protobuf_FieldMask+Extensions.swift:340func isValid<M>(for messageType: M.Type) -> Bool where M : Message, M : _ProtoNameProviding
Parameters
- messageType
Message type to paths check with.
Returns
Boolean determines FieldMask is valid.
Other members in extension
Types
struct MergeOptions
Defines available options for merging two messages.
Type members
init(
) init<M>(allFieldsOf: M.Type
) Initiates a field mask with all fields of the message type.
init<M>(fieldNumbers: [Int], of: M.Type
) throws Initiates a field mask from some particular field numbers of a message
init?(jsonPaths: String...
) Creates a new
Google_Protobuf_FieldMask
from the given paths.init(protoPaths: String...
) Creates a new
Google_Protobuf_FieldMask
from the given paths.init(protoPaths: [String]
) Creates a new
Google_Protobuf_FieldMask
from the given array of paths.static let protoMessageName: String
static func == (lhs: Google_Protobuf_FieldMask, rhs: Google_Protobuf_FieldMask
) -> Bool
Show implementation details (1)
Hide implementation details
Instance members
var canonical: Google_Protobuf_FieldMask
Converts a FieldMask to the canonical form. It will:
var paths: [String]
The set of field mask paths.
var unknownFields: UnknownStorage
func addPath<M>(String, of: M.Type
) throws Adds a path to FieldMask after checking whether the given path is valid. This method check-fails if the path is not a valid path for Message type.
func contains(String
) -> Bool Returns true if path is covered by the given FieldMask. Note that path “foo.bar” covers all paths like “foo.bar.baz”, “foo.bar.quz.x”, etc. Also note that parent paths are not covered by explicit child path, i.e. “foo.bar” does NOT cover “foo”, even if “bar” is the only child.
func decodeMessage<D>(decoder: inout D
) throws func intersect(Google_Protobuf_FieldMask
) -> Google_Protobuf_FieldMask Creates an intersection of two FieldMasks.
func subtract(Google_Protobuf_FieldMask
) -> Google_Protobuf_FieldMask Creates a FieldMasks with paths of the original FieldMask that does not included in mask.
func traverse<V>(visitor: inout V
) throws func union(Google_Protobuf_FieldMask
) -> Google_Protobuf_FieldMask Creates an union of two FieldMasks.