ICU4X
International Components for Unicode
All Classes Namespaces Files Functions Variables Typedefs Macros Pages
diplomat_runtime.hpp File Reference
#include <optional>
#include <string>
#include <type_traits>
#include <variant>
#include <cstdint>
#include <functional>
#include <array>

Go to the source code of this file.

Classes

struct  diplomat::Ok< T >
 
struct  diplomat::Err< T >
 
class  diplomat::result< T, E >
 
class  diplomat::Utf8Error
 
class  diplomat::span< T >
 
struct  diplomat::fn_traits< std::function< Ret(Args...)> >
 
struct  diplomat::fn_traits< std::function< Ret(Args...)> >::as_ffi< T, typename >
 

Namespaces

namespace  diplomat
 
namespace  diplomat::capi
 

Macros

#define MAKE_SLICES(name, c_ty)
 
#define MAKE_SLICES_AND_OPTIONS(name, c_ty)
 

Functions

void diplomat::_flush (capi::DiplomatWrite *w)
 
bool diplomat::_grow (capi::DiplomatWrite *w, uintptr_t requested)
 
capi::DiplomatWrite diplomat::WriteFromString (std::string &string)
 
template<class T >
 diplomat::fn_traits (T) -> fn_traits< T >
 

Macro Definition Documentation

◆ MAKE_SLICES

#define MAKE_SLICES (   name,
  c_ty 
)
Value:
typedef struct Diplomat##name##View { \
const c_ty* data; \
size_t len; \
} Diplomat##name##View; \
typedef struct Diplomat##name##ViewMut { \
c_ty* data; \
size_t len; \
} Diplomat##name##ViewMut; \
typedef struct Diplomat##name##Array { \
const c_ty* data; \
size_t len; \
} Diplomat##name##Array;

◆ MAKE_SLICES_AND_OPTIONS

#define MAKE_SLICES_AND_OPTIONS (   name,
  c_ty 
)
Value:
MAKE_SLICES(name, c_ty) \
typedef struct Option##name {union { c_ty ok; }; bool is_ok; } Option##name; \
typedef struct Option##name##View {union { Diplomat##name##View ok; }; bool is_ok; } Option##name##View; \
typedef struct Option##name##ViewMut {union { Diplomat##name##ViewMut ok; }; bool is_ok; } Option##name##ViewMut; \
typedef struct Option##name##Array {union { Diplomat##name##Array ok; }; bool is_ok; } Option##name##Array; \
#define MAKE_SLICES(name, c_ty)
Definition: diplomat_runtime.hpp:38