summaryrefslogtreecommitdiffstats
path: root/toolkit/components/uniffi-fixture-callbacks/src/callbacks.udl
blob: a6d44ef59894e3e7385e8ef5ef641fdc0bdd3c5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
callback interface Logger {
   void log(string message);
   void finished();
 };

namespace fixture_callbacks {
    // Log all even numbers in a vec, then call the finished() method
    void log_even_numbers(Logger logger, sequence<i32> items);
    // Works exactly the same as `log_even_numbers()`, except we configure this
    // to run on the main thread in `uniffi-bindgen-gecko-js/config.toml`
    void log_even_numbers_main_thread(Logger logger, sequence<i32> items);
};