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 / external.rs
blob3ecf09d47f5a3bdcd571133d85b6e4d71d919e9c
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 ExternalCodeType {
10     name: String,
13 impl ExternalCodeType {
14     pub fn new(name: String) -> Self {
15         Self { name }
16     }
19 impl CodeType for ExternalCodeType {
20     fn type_label(&self, _ci: &ComponentInterface) -> String {
21         self.name.clone()
22     }
24     fn canonical_name(&self) -> String {
25         format!("Type{}", self.name)
26     }