Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
SpanWriter Class Reference

Minimal stream for writing to an existing span of bytes. More...

#include <streams.h>

Public Member Functions

 SpanWriter (std::span< std::byte > dest)
template<typename... Args>
 SpanWriter (std::span< std::byte > dest, Args &&... args)
void write (std::span< const std::byte > src)
template<typename T>
SpanWriter & operator<< (const T &obj)

Private Attributes

std::span< std::byte > m_dest

Detailed Description

Minimal stream for writing to an existing span of bytes.

Definition at line 129 of file streams.h.

Constructor & Destructor Documentation

◆ SpanWriter() [1/2]

SpanWriter::SpanWriter ( std::span< std::byte > dest)
inlineexplicit

Definition at line 135 of file streams.h.

Here is the caller graph for this function:

◆ SpanWriter() [2/2]

template<typename... Args>
SpanWriter::SpanWriter ( std::span< std::byte > dest,
Args &&... args )
inline

Definition at line 137 of file streams.h.

Here is the call graph for this function:

Member Function Documentation

◆ operator<<()

template<typename T>
SpanWriter & SpanWriter::operator<< ( const T & obj)
inline

Definition at line 152 of file streams.h.

Here is the call graph for this function:

◆ write()

void SpanWriter::write ( std::span< const std::byte > src)
inline

Definition at line 142 of file streams.h.

Member Data Documentation

◆ m_dest

std::span<std::byte> SpanWriter::m_dest
private

Definition at line 132 of file streams.h.


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