A read-only view of a Python bytes-like object's contiguous buffer.
More...
#include <snicholls/core_adapters/nanobind/bytes.hpp>
|
| std::span< const std::byte > | bytes () const noexcept |
| | The bytes.
|
| |
| std::string_view | chars () const noexcept |
| | The bytes as characters.
|
| |
| std::size_t | size () const noexcept |
| | The length in bytes.
|
| |
| bool | acquire (PyObject *src) noexcept |
| | Takes src's buffer (the type caster's step).
|
| |
A read-only view of a Python bytes-like object's contiguous buffer.
Definition at line 164 of file bytes.hpp.
◆ acquire()
| bool snicholls::python::byte_view::acquire |
( |
PyObject * |
src | ) |
|
|
inlinenoexcept |
Takes src's buffer (the type caster's step).
- Parameters
-
- Returns
- whether it has one.
Definition at line 178 of file bytes.hpp.
◆ bytes()
| std::span< const std::byte > snicholls::python::byte_view::bytes |
( |
| ) |
const |
|
inlinenoexcept |
The bytes.
- Returns
- a span valid while this view lives.
Definition at line 168 of file bytes.hpp.
◆ chars()
| std::string_view snicholls::python::byte_view::chars |
( |
| ) |
const |
|
inlinenoexcept |
The bytes as characters.
- Returns
- a string_view valid while this view lives.
Definition at line 173 of file bytes.hpp.
◆ size()
| std::size_t snicholls::python::byte_view::size |
( |
| ) |
const |
|
inlinenoexcept |
The length in bytes.
- Returns
- the size.
Definition at line 175 of file bytes.hpp.
The documentation for this class was generated from the following file: