Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodecV2 ¶
type CodecV2[C any, T pointerMessage[C]] struct { // contains filtered or unexported fields }
CodecV2 wraps a google.golang.org/protobuf/proto.Message and implements Codec
func NewV2 ¶
NewV2 constructs a CodecV2 zero-value. It exists because type-parameter inference is nicer with function-calls than struct-literals
func (*CodecV2[C, T]) Get ¶
func (c *CodecV2[C, T]) Get() T
Get implies returns the internal protobuf message value
func (*CodecV2[C, T]) MarshalBinary ¶
MarshalBinary on a ProtoCodec returns the encoded proto message
func (*CodecV2[C, T]) Set ¶
func (c *CodecV2[C, T]) Set(v T)
Set bypasses Marshaling and lets you set the internal protobuf value
func (*CodecV2[C, T]) UnmarshalBinary ¶
UnmarshalBinary on a ProtoCodec unmarshals provided data into the proto message
type ProtoCodec ¶
ProtoCodec wraps a proto.Message and implements Codec
func (*ProtoCodec) MarshalBinary ¶
func (c *ProtoCodec) MarshalBinary() ([]byte, error)
MarshalBinary on a ProtoCodec returns the encoded proto message
func (*ProtoCodec) UnmarshalBinary ¶
func (c *ProtoCodec) UnmarshalBinary(data []byte) error
UnmarshalBinary on a ProtoCodec unmarshals provided data into the proto message