# `./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`

-----------------------------------------------------
