Bug 1870642 - Fix Collection deleted snackbar that overlaps the toolbar r=android...
[gecko.git] / third_party / rust / uniffi_bindgen / src / bindings / python / gen_python / external.rs
blob0a46251d6d9a73e2e31ac19646f661f82b097614
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;
7 #[derive(Debug)]
8 pub struct ExternalCodeType {
9     name: String,
12 impl ExternalCodeType {
13     pub fn new(name: String) -> Self {
14         Self { name }
15     }
18 impl CodeType for ExternalCodeType {
19     fn type_label(&self) -> String {
20         super::PythonCodeOracle.class_name(&self.name)
21     }
23     fn canonical_name(&self) -> String {
24         format!("Type{}", self.name)
25     }