C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::chunk Class Reference

An implicitly shared type for binary data. More...

#include <chunk.hpp>

Public Member Functions

 chunk (const_byte_span buffer)
 
 chunk (caf::span< const const_byte_span > buffers)
 
 chunk (intrusive_ptr< data > data) noexcept
 
 operator bool () const noexcept
 Checks whether get_data() returns a non-null pointer.
 
size_t size () const noexcept
 Returns the number of bytes stored in this chunk.
 
bool empty () const noexcept
 Returns whether size() == 0.
 
void swap (chunk &other) noexcept
 Exchange the contents of this chunk with other.
 
const_byte_span bytes () const noexcept
 Returns the bytes stored in this chunk.
 
const intrusive_ptr< data > & get_data () const &noexcept
 Returns the underlying data object.
 
intrusive_ptr< data > && get_data () &&noexcept
 Returns the underlying data object.
 
bool equal_to (const chunk &other) const noexcept
 

Static Public Member Functions

template<class... ByteBuffers>
static chunk from_buffers (const ByteBuffers &... buffers)
 

Detailed Description

An implicitly shared type for binary data.


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