WPILibC++ 2023.4.3-108-ge5452e3
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_)
 
std::span< const char > data () const
 
std::span< char > data ()
 
 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/6]

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

◆ Buffer() [2/6]

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

◆ Buffer() [3/6]

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

◆ Buffer() [4/6]

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

◆ Buffer() [5/6]

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

◆ Buffer() [6/6]

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

Member Function Documentation

◆ Allocate()

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

◆ 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: