How to work with Application Objects in binding generators
/// Methods of the Foo interface with parameters
enum ParamsOfAppFoo {
CallWithParamsAndResult { a: String, b: String },
CallWithParams { a: String, b: String },
CallWithResult,
CallWithoutParamsAndResult,
NotifyWithParams { a: String, b: String },
NotifyWithoutParams
}
/// Method results of the Foo interface
enum ResultOfAppFoo {
CallWithParamsAndResult { c: String },
CallWithParams,
CallWithResult { c: String },
CallWithoutParamsAndResult,
}
/// API function that accepts an application object as a parameter
async fn foo(
context: Arc<ClientContext>,
params: ParamsOfFoo,
obj: AppObject<ParamsOfAppFoo, ResultOfAppFoo>,
) -> ClientResult<()> {}How to detect
Generated code
Interface declaration
Interface dispatcher
Functions with application object
Last updated