| 232 | /// Use get() to retrieve a callable if you need to invoke the method from C++ code. |
| 233 | template<typename Callable> |
| 234 | void bind(const Config<Callable>& config) { |
| 235 | using Sig = typename callable_traits<typename decay<Callable>::type>::signature; |
| 236 | RpcFn<Sig> wrapped(config.fn); |
| 237 | registerMethod<Sig>(config.name.c_str(), wrapped, config.params, config.description, config.tags, config.mode); |
| 238 | } |
| 239 | |
| 240 | /// Convenience overload: bind method by name, function, and optional mode |
| 241 | template<typename Callable> |