GRPC C++  1.26.0
Data Structures | Public Member Functions
grpc::MetadataBatch Class Reference

A C++ wrapper for the grpc_metadata_batch struct. More...

#include <channel_filter.h>

Data Structures

class  const_iterator
 

Public Member Functions

 MetadataBatch (grpc_metadata_batch *batch)
 Borrows a pointer to batch, but does NOT take ownership. More...
 
grpc_metadata_batchbatch () const
 
grpc_linked_mdelemAddMetadata (const string &key, const string &value)
 Adds metadata and returns the newly allocated storage. More...
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

A C++ wrapper for the grpc_metadata_batch struct.

Constructor & Destructor Documentation

◆ MetadataBatch()

grpc::MetadataBatch::MetadataBatch ( grpc_metadata_batch batch)
inlineexplicit

Borrows a pointer to batch, but does NOT take ownership.

The caller must ensure that batch continues to exist for as long as the MetadataBatch object does.

Member Function Documentation

◆ AddMetadata()

grpc_linked_mdelem * grpc::MetadataBatch::AddMetadata ( const string key,
const string value 
)

Adds metadata and returns the newly allocated storage.

The caller takes ownership of the result, which must exist for the lifetime of the gRPC call.

◆ batch()

grpc_metadata_batch* grpc::MetadataBatch::batch ( ) const
inline

◆ begin()

const_iterator grpc::MetadataBatch::begin ( ) const
inline

◆ end()

const_iterator grpc::MetadataBatch::end ( ) const
inline

The documentation for this class was generated from the following files: