|
Ruby 4.1.0dev (2026-10-21 revision 536dc6f98b72e6999a84bb6373562c43cb1ddf8a)
|
Ownership of buffers from C++, and access to their contents. More...
#include "prism/compiler/cplusplus.hpp"#include "prism/compiler/lifetimebound.hpp"#include "prism/buffer.h"#include <memory>#include <string_view>
Go to the source code of this file.
Data Structures | |
| struct | prism::buffer_deleter |
| Frees a buffer with pm_buffer_free. More... | |
Typedefs | |
| using | prism::unique_buffer = std::unique_ptr< pm_buffer_t, buffer_deleter > |
| An owned buffer. | |
Functions | |
| unique_buffer | prism::make_buffer () noexcept |
| Allocate a new empty buffer. | |
| std::string_view | prism::view (const pm_buffer_t *buffer PRISM_LIFETIMEBOUND) noexcept |
| The bytes written to the given buffer so far. | |
Ownership of buffers from C++, and access to their contents.
Definition in file buffer.hpp.
| using prism::unique_buffer = typedef std::unique_ptr<pm_buffer_t, buffer_deleter> |
An owned buffer.
Definition at line 30 of file buffer.hpp.
|
inlinenoexcept |
Allocate a new empty buffer.
Allocation failure aborts, so this never throws.
Definition at line 38 of file buffer.hpp.
Referenced by prism::make_buffer().
|
inlinenoexcept |
The bytes written to the given buffer so far.
| buffer | The buffer to view. |
Definition at line 49 of file buffer.hpp.
Referenced by prism::view(), and prism::view().