Copyright 2019 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Package protoiface contains types referenced or implemented by messages. WARNING: This package should only be imported by message implementations. The functionality found in this package should be accessed through higher-level abstractions provided by the proto package.
package protoiface

import (
	
	
)
Methods is a set of optional fast-path implementations of various operations.
Flags indicate support for optional features.
Size returns the size in bytes of the wire-format encoding of a message. Marshal must be provided if a custom Size is provided.
Marshal formats a message in the wire-format encoding to the provided buffer. Size should be provided if a custom Marshal is provided. It must not return an error for a partial message.
Unmarshal parses the wire-format encoding and merges the result into a message. It must not reset the target message or return an error for a partial message.
Merge merges the contents of a source message into a destination message.
CheckInitialized returns an error if any required fields in the message are not set.
SupportFlags indicate support for optional features.
SupportMarshalDeterministic reports whether MarshalOptions.Deterministic is supported.
SupportUnmarshalDiscardUnknown reports whether UnmarshalOptions.DiscardUnknown is supported.
SizeInput is input to the Size method.
SizeOutput is output from the Size method.
MarshalInput is input to the Marshal method.
type MarshalInput = struct {
	pragma.NoUnkeyedLiterals

	Message protoreflect.Message
	Buf     []byte // output is appended to this buffer
	Flags   MarshalInputFlags
}
MarshalOutput is output from the Marshal method.
type MarshalOutput = struct {
	pragma.NoUnkeyedLiterals

	Buf []byte // contains marshaled message
}
MarshalInputFlags configure the marshaler. Most flags correspond to fields in proto.MarshalOptions.
UnmarshalInput is input to the Unmarshal method.
UnmarshalOutput is output from the Unmarshal method.
UnmarshalInputFlags configure the unmarshaler. Most flags correspond to fields in proto.UnmarshalOptions.
UnmarshalOutputFlags are output from the Unmarshal method.
UnmarshalInitialized may be set on return if all required fields are known to be set. If unset, then it does not necessarily indicate that the message is uninitialized, only that its status could not be confirmed.
MergeInput is input to the Merge method.
MergeOutput is output from the Merge method.
MergeOutputFlags are output from the Merge method.
MergeComplete reports whether the merge was performed. If unset, the merger must have made no changes to the destination.
CheckInitializedInput is input to the CheckInitialized method.
CheckInitializedOutput is output from the CheckInitialized method.