folly::IOBuf::to

Returns a container containing the chain data.

Synopsis

Declared in <folly/io/IOBuf.h>

template<class Container>
Container
to() const;

Description

This is meant to be used with containers such as std::string or std::vector<char>, but any container which supports reserve(), insert(), and has char or unsigned char value type is supported.

Return Value

A Container whose data equals the coalesced data of this chain

Template Parameters

NameDescription
ContainerThe type of container to return.