ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
esphome::json::JsonBuildRef Struct Reference

Non-owning reference to a JSON build callable, valid only for the call it is passed to. More...

#include <json_util.h>

Public Member Functions

void operator() (JsonObject root) const
 

Data Fields

void(* fn )(void *ctx, JsonObject root)
 
void * ctx
 

Detailed Description

Non-owning reference to a JSON build callable, valid only for the call it is passed to.

Lets one out-of-line body run any callable without a std::function, which allocates for captures over 8 bytes.

Definition at line 175 of file json_util.h.

Member Function Documentation

◆ operator()()

void esphome::json::JsonBuildRef::operator() ( JsonObject root) const
inline

Definition at line 178 of file json_util.h.

Field Documentation

◆ ctx

void* esphome::json::JsonBuildRef::ctx

Definition at line 177 of file json_util.h.

◆ fn

void(* esphome::json::JsonBuildRef::fn) (void *ctx, JsonObject root)

Definition at line 176 of file json_util.h.


The documentation for this struct was generated from the following file: