template <typename FieldMetadata>

struct TypedProtoWriter

Defined at line 330 of file ../../third_party/perfetto/include/perfetto/tracing/traced_proto.h

TypedProtoWriter takes the protozero message (TracedProto

<MessageType

>),

field description (FieldMetadata) and value and writes the given value

into the given field of the given protozero message.

This is primarily used for inline writing of typed messages:

TRACE_EVENT(..., pbzero::Message:kField, value);

Ideally we would use a function here and not a struct, but passing template

arguments directly to the function (e.g. foo

<void

>()) isn't supported until

C++20, so we have to use a helper struct here.

Public Methods

template <typename Proto, typename ValueType>
void Write (TracedProto<Proto> & context, ValueType && value)

Defined at line 344 of file ../../third_party/perfetto/include/perfetto/tracing/traced_proto.h

Records