WPILibC++ 2024.3.2
wpi::uv::Buffer Class Reference

Data buffer. More...

#include <wpinet/uv/Buffer.h>

Inheritance diagram for wpi::uv::Buffer:
uv_buf_t

Public Member Functions

 Buffer ()
 
 Buffer (const uv_buf_t &oth)
 
 Buffer (std::string_view str)
 
 Buffer (std::span< const uint8_t > arr)
 
 Buffer (char *base_, size_t len_)
 
 Buffer (const char *base_, size_t len_)
 
 Buffer (uint8_t *base_, size_t len_)
 
 Buffer (const uint8_t *base_, size_t len_)
 
std::span< const char > data () const
 
std::span< char > data ()
 
std::span< const uint8_t > bytes () const
 
std::span< uint8_t > bytes ()
 
 operator std::span< const char > () const
 
 operator std::span< char > ()
 
Buffer Dup () const
 
void Deallocate ()
 
Buffer Move ()
 

Static Public Member Functions

static Buffer Allocate (size_t size)
 
static Buffer Dup (std::string_view in)
 
static Buffer Dup (std::span< const uint8_t > in)
 

Friends

void swap (Buffer &a, Buffer &b)
 

Additional Inherited Members

- Public Attributes inherited from uv_buf_t
char * base
 
size_t len
 
ULONG len
 

Detailed Description

Data buffer.

Convenience wrapper around uv_buf_t.

Constructor & Destructor Documentation

◆ Buffer() [1/8]

wpi::uv::Buffer::Buffer ( )
inline

◆ Buffer() [2/8]

wpi::uv::Buffer::Buffer ( const uv_buf_t oth)
inline

◆ Buffer() [3/8]

wpi::uv::Buffer::Buffer ( std::string_view  str)
inline

◆ Buffer() [4/8]

wpi::uv::Buffer::Buffer ( std::span< const uint8_t >  arr)
inline

◆ Buffer() [5/8]

wpi::uv::Buffer::Buffer ( char *  base_,
size_t  len_ 
)
inline

◆ Buffer() [6/8]

wpi::uv::Buffer::Buffer ( const char *  base_,
size_t  len_ 
)
inline

◆ Buffer() [7/8]

wpi::uv::Buffer::Buffer ( uint8_t *  base_,
size_t  len_ 
)
inline

◆ Buffer() [8/8]

wpi::uv::Buffer::Buffer ( const uint8_t *  base_,
size_t  len_ 
)
inline

Member Function Documentation

◆ Allocate()

static Buffer wpi::uv::Buffer::Allocate ( size_t  size)
inlinestatic

◆ bytes() [1/2]

std::span< uint8_t > wpi::uv::Buffer::bytes ( )
inline

◆ bytes() [2/2]

std::span< const uint8_t > wpi::uv::Buffer::bytes ( ) const
inline

◆ data() [1/2]

std::span< char > wpi::uv::Buffer::data ( )
inline

◆ data() [2/2]

std::span< const char > wpi::uv::Buffer::data ( ) const
inline

◆ Deallocate()

void wpi::uv::Buffer::Deallocate ( )
inline

◆ Dup() [1/3]

Buffer wpi::uv::Buffer::Dup ( ) const
inline

◆ Dup() [2/3]

static Buffer wpi::uv::Buffer::Dup ( std::span< const uint8_t >  in)
inlinestatic

◆ Dup() [3/3]

static Buffer wpi::uv::Buffer::Dup ( std::string_view  in)
inlinestatic

◆ Move()

Buffer wpi::uv::Buffer::Move ( )
inline

◆ operator std::span< char >()

wpi::uv::Buffer::operator std::span< char > ( )
inline

◆ operator std::span< const char >()

wpi::uv::Buffer::operator std::span< const char > ( ) const
inline

Friends And Related Function Documentation

◆ swap

void swap ( Buffer a,
Buffer b 
)
friend

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