facil.io

#./fio-stl/104 mustache.h

14 public symbols.

#Macros

#FIO_MUSTACHE_MAX_DEPTH

c
#define FIO_MUSTACHE_MAX_DEPTH 128

The maximum depth of a template's context

Symbol type: macro

#FIO_MUSTACHE_PRESERVE_PADDING

c
#define FIO_MUSTACHE_PRESERVE_PADDING 0

Preserves padding for stand-alone variables and partial templates

Symbol type: macro

#FIO_MUSTACHE_LAMBDA_SUPPORT

c
#define FIO_MUSTACHE_LAMBDA_SUPPORT 0

Supports raw text for lambda style languages.

Symbol type: macro

#FIO_MUSTACHE_ISOLATE_PARTIALS

c
#define FIO_MUSTACHE_ISOLATE_PARTIALS 1

Limits the scope of partial templates to the context of their section.

Symbol type: macro

#FIO_MUSTACHE_SECURE_PATH

c
#define FIO_MUSTACHE_SECURE_PATH 1

Symbol type: macro

#Types

#fio_mustache_s

c
struct fio_mustache_s

Symbol type: type

#fio_mustache_bargs_s

c
struct fio_mustache_bargs_s

Symbol type: type

#fio_mustache_load_args_s

c
typedef struct {
/** The file's content (if pre-loaded) */
fio_buf_info_s data;
/** The file's name (even if preloaded, used for partials load paths) */
fio_buf_info_s filename;
/** Loads the file's content, returning a `fio_buf_info_s` structure. */
fio_buf_info_s (*load_file_data)(fio_buf_info_s filename, void *udata);
/** Frees the file's content from its `fio_buf_info_s` structure. */
void (*free_file_data)(fio_buf_info_s file_data, void *udata);
/** Called when YAML front matter data was found. */
void (*on_yaml_front_matter)(fio_buf_info_s yaml_front_matter, void *udata);
/** Opaque user data. */
void *udata;
} fio_mustache_load_args_s

Symbol type: type

#Functions

#fio_mustache_load

c
fio_mustache_s *fio_mustache_load(fio_mustache_load_args_s settings)

Symbol type: function

#fio_mustache_load

c
#define fio_mustache_load(...)   \
  fio_mustache_load((fio_mustache_load_args_s){__VA_ARGS__})

Note: this may be a macro only / macro wrapper for a function.

Symbol type: macro

#fio_mustache_free

c
void fio_mustache_free(fio_mustache_s *m)

Symbol type: function

#fio_mustache_dup

c
fio_mustache_s *fio_mustache_dup(fio_mustache_s *m)

Increases the mustache template's reference count.

Symbol type: function

#fio_mustache_build

c
void *fio_mustache_build(fio_mustache_s *m, fio_mustache_bargs_s)

Builds the template, returning the final value of udata (or NULL).

Symbol type: function

#fio_mustache_build

c
#define fio_mustache_build(m, ...)   \
  fio_mustache_build((m), ((fio_mustache_bargs_s){__VA_ARGS__}))

Note: this may be a macro only / macro wrapper for a function.

Symbol type: macro