Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::prometheus::OStream Class Reference

A stream that can optionally compress its data. More...

#include <OStream.hpp>

Public Member Functions

 OStream (bool compressionEnabled)
 Construct a new OStream object.
 
 OStream (OStream const &)=delete
 
 OStream (OStream &&)=delete
 
template<typename T >
OStreamoperator<< (T const &value)
 Write to the stream.
 
std::string data () &&
 Get the data from the stream.
 

Detailed Description

A stream that can optionally compress its data.

Constructor & Destructor Documentation

◆ OStream()

util::prometheus::OStream::OStream ( bool compressionEnabled)

Construct a new OStream object.

Parameters
compressionEnabledWhether to compress the data

Member Function Documentation

◆ data()

std::string util::prometheus::OStream::data ( ) &&

Get the data from the stream.

Note
This resets the stream and clears the buffer. Stream cannot be used after this.
Returns
The data

◆ operator<<()

template<typename T >
OStream & util::prometheus::OStream::operator<< ( T const & value)
inline

Write to the stream.

Template Parameters
TType of the value to write
Parameters
valueThe value to write
Returns
The stream

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