Hide CallbackHelper and CallbackSignatureHelper from the API docs

There's no hide-from-docs tag for doxygen, so move these into the
private_api namespace.
This commit is contained in:
Simon Hausmann 2021-06-18 13:48:29 +02:00
parent 51d532d209
commit 0a3ec534ae
2 changed files with 3 additions and 1 deletions

View file

@ -83,10 +83,12 @@ private:
cbindgen_private::CallbackOpaque inner;
};
namespace private_api {
template<typename A, typename R> struct CallbackSignatureHelper { using Result = R(A); };
template<typename R> struct CallbackSignatureHelper<void, R> { using Result = R(); };
template<typename A, typename R = void> using CallbackHelper =
Callback<typename CallbackSignatureHelper<A, R>::Result>;
}
} // namespace sixtyfps

View file

@ -24,7 +24,7 @@ fn default_config() -> cbindgen::Config {
documentation: true,
export: cbindgen::ExportConfig {
rename: [
("Callback".into(), "CallbackHelper".into()),
("Callback".into(), "private_api::CallbackHelper".into()),
("VoidArg".into(), "void".into()),
("KeyEventArg".into(), "KeyEvent".into()),
]