Debian Codegraph @

third_party/rust/uniffi_bindgen/src/bindings/swift/gen_swift/miscellany.rs

raw
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/. */
4
5 use super::CodeType;
6
7 #[derive(Debug)]
8 pub struct TimestampCodeType;
9
10 impl CodeType for TimestampCodeType {
11 fn type_label(&self) -> String {
12 "Date".into()
13 }
14
15 fn canonical_name(&self) -> String {
16 "Timestamp".into()
17 }
18 }
19
20 #[derive(Debug)]
21 pub struct DurationCodeType;
22
23 impl CodeType for DurationCodeType {
24 fn type_label(&self) -> String {
25 "TimeInterval".into()
26 }
27
28 fn canonical_name(&self) -> String {
29 "Duration".into()
30 }
31 }