userver: dump::MockWriter Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
dump::MockWriter Class Referencefinal

A Writer that appends to a string buffer (used in tests) More...

#include <userver/dump/operations_mock.hpp>

+ Inheritance diagram for dump::MockWriter:
+ Collaboration diagram for dump::MockWriter:

Public Member Functions

 MockWriter ()
 Creates a MockWriter with an empty buffer.
 
void Finish () override
 Must be called once all data has been written.
 
std::string Extract () &&
 
- Public Member Functions inherited from dump::Writer
template<typename T >
void Write (const T &data)
 Writes binary data.
 

Additional Inherited Members

Detailed Description

A Writer that appends to a string buffer (used in tests)

Definition at line 10 of file operations_mock.hpp.

Member Function Documentation

◆ Extract()

std::string dump::MockWriter::Extract ( ) &&

Extracts the built string, leaving the Writer in a valid but unspecified state

◆ Finish()

void dump::MockWriter::Finish ( )
overridevirtual

Must be called once all data has been written.

Warning
This method must not be called from within Write/Read
Exceptions
`Error`on write operation failure

Implements dump::Writer.


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