summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/src/common.rs
diff options
context:
space:
mode:
Diffstat (limited to 'intl/icu_capi/src/common.rs')
-rw-r--r--intl/icu_capi/src/common.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/intl/icu_capi/src/common.rs b/intl/icu_capi/src/common.rs
new file mode 100644
index 0000000000..d11ca26044
--- /dev/null
+++ b/intl/icu_capi/src/common.rs
@@ -0,0 +1,16 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+#[diplomat::bridge]
+pub mod ffi {
+ use alloc::boxed::Box;
+
+ #[diplomat::enum_convert(core::cmp::Ordering)]
+ #[diplomat::rust_link(core::cmp::Ordering, Enum)]
+ pub enum ICU4XOrdering {
+ Less = -1,
+ Equal = 0,
+ Greater = 1,
+ }
+}