Backed out 5 changesets (bug 1890092, bug 1888683) for causing build bustages & crash...
[gecko.git] / third_party / rust / uniffi_bindgen / src / bindings / kotlin / gen_kotlin / executor.rs
blob154e12a3810968587a865d03be2d543e6d0c919a
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 use super::CodeType;
6 use crate::ComponentInterface;
8 #[derive(Debug)]
9 pub struct ForeignExecutorCodeType;
11 impl CodeType for ForeignExecutorCodeType {
12     fn type_label(&self, _ci: &ComponentInterface) -> String {
13         // Kotlin uses a CoroutineScope for ForeignExecutor
14         "CoroutineScope".into()
15     }
17     fn canonical_name(&self) -> String {
18         "ForeignExecutor".into()
19     }
21     fn initialization_fn(&self) -> Option<String> {
22         Some("FfiConverterForeignExecutor.register".into())
23     }