Lance C/C++ Bindings
C ABI and header-only C++ RAII wrappers for the Lance columnar data format
Loading...
Searching...
No Matches
lance::detail Namespace Reference

Classes

struct  FreeBytes
 Deleter for byte buffers allocated by the C API. More...
 
struct  FreeString
 Deleter for strings allocated by the C API. More...
 
class  VectorIndexOptionsStorage
 

Typedefs

using OwnedString = std::unique_ptr<const char, FreeString>
 Owner of a string allocated by the C API.
 
using OwnedBytes = std::unique_ptr<uint8_t, FreeBytes>
 Owner of a byte buffer allocated by the C API.
 

Functions

void throw_error ()
 
std::string take_string (const char *raw)
 Take ownership of a string allocated by the C API.
 
std::vector< uint8_t > take_bytes (uint8_t *raw, size_t len)
 

Typedef Documentation

◆ OwnedBytes

using lance::detail::OwnedBytes = std::unique_ptr<uint8_t, FreeBytes>

Owner of a byte buffer allocated by the C API.

Definition at line 86 of file declarations.hpp.

◆ OwnedString

using lance::detail::OwnedString = std::unique_ptr<const char, FreeString>

Owner of a string allocated by the C API.

Definition at line 67 of file declarations.hpp.

Function Documentation

◆ take_bytes()

std::vector< uint8_t > lance::detail::take_bytes ( uint8_t * raw,
size_t len )

Take ownership of a byte buffer allocated by the C API. A null buffer is valid only with len == 0, where it denotes an empty result.

◆ take_string()

std::string lance::detail::take_string ( const char * raw)

Take ownership of a string allocated by the C API.

◆ throw_error()

void lance::detail::throw_error ( )

Throw the pending thread-local error.

Call this only after a documented failure sentinel. If the native call reported failure without setting a thread-local error, throw LANCE_ERR_INTERNAL so the missing detail cannot turn into a null dereference at the call site.