anypb

package
v0.0.0-...-da76002 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalFrom

func MarshalFrom(dst *anypb.Any, src proto.Message) error

MarshalFrom marshals src into dst as the underlying message using the provided marshal options.

If no options are specified, call dst.MarshalFrom instead.

func New

func New(src proto.Message) (*anypb.Any, error)

New marshals src into a new Any instance.

func UnmarshalNew

func UnmarshalNew(src *anypb.Any, opts fastproto.UnmarshalOptions) (dst proto.Message, err error)

UnmarshalNew unmarshals the underlying message from src into dst, which is newly created message using a type resolved from the type URL. The message type is resolved according to opt.Resolver, which should implement protoregistry.MessageTypeResolver. It reports an error if the underlying message type could not be resolved.

func UnmarshalTo

func UnmarshalTo(src *anypb.Any, dst proto.Message, opts fastproto.UnmarshalOptions) error

UnmarshalTo unmarshals the underlying message from src into dst using the provided unmarshal options. It reports an error if dst is not of the right message type.

If no options are specified, call src.UnmarshalTo instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL