Back to Site
Loading...
Searching...
No Matches
librats::ByteSpan Class Reference

Non-owning view over a contiguous run of writable bytes. More...

#include <bytes.h>

Public Member Functions

constexpr ByteSpan ()=default
 
constexpr ByteSpan (uint8_t *data, size_t size)
 
uint8_t * data () const noexcept
 
size_t size () const noexcept
 
bool empty () const noexcept
 
uint8_t * begin () const noexcept
 
uint8_t * end () const noexcept
 
 operator ByteView () const noexcept
 

Detailed Description

Non-owning view over a contiguous run of writable bytes.

Definition at line 50 of file bytes.h.

Constructor & Destructor Documentation

◆ ByteSpan() [1/2]

constexpr librats::ByteSpan::ByteSpan ( )
constexprdefault

◆ ByteSpan() [2/2]

constexpr librats::ByteSpan::ByteSpan ( uint8_t *  data,
size_t  size 
)
inlineconstexpr

Definition at line 53 of file bytes.h.

Member Function Documentation

◆ begin()

uint8_t * librats::ByteSpan::begin ( ) const
inlinenoexcept

Definition at line 59 of file bytes.h.

◆ data()

uint8_t * librats::ByteSpan::data ( ) const
inlinenoexcept

Definition at line 55 of file bytes.h.

◆ empty()

bool librats::ByteSpan::empty ( ) const
inlinenoexcept

Definition at line 57 of file bytes.h.

◆ end()

uint8_t * librats::ByteSpan::end ( ) const
inlinenoexcept

Definition at line 60 of file bytes.h.

◆ operator ByteView()

librats::ByteSpan::operator ByteView ( ) const
inlinenoexcept

Definition at line 62 of file bytes.h.

◆ size()

size_t librats::ByteSpan::size ( ) const
inlinenoexcept

Definition at line 56 of file bytes.h.


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