1use saa_schema::{saa_type};
5
6pub mod identity;
8pub mod expiration;
10
11#[cfg(not(feature = "wasm"))]
13mod ts;
14#[cfg(not(feature = "wasm"))]
15mod bin;
16#[cfg(not(feature = "wasm"))]
17mod uint;
18
19
20pub mod binary {
21 #[cfg(not(feature = "wasm"))]
22 pub use super::bin::{Binary, to_json_binary, from_json};
23 #[cfg(feature = "wasm")]
24 pub use crate::wasm::{Binary, to_json_binary, from_json, to_json_string};
25 #[cfg(all(feature = "types", not(feature = "wasm")))]
26 pub use serde_json_wasm::to_string as to_json_string;
27}
28
29pub mod uints {
30 #[cfg(not(feature = "wasm"))]
31 pub use super::uint::{Uint128, Uint64};
32 #[cfg(feature = "wasm")]
33 pub use crate::wasm::{Uint128, Uint64};
34}
35
36pub mod timestamp {
37 #[cfg(not(feature = "wasm"))]
38 pub use super::ts::Timestamp;
39 #[cfg(feature = "wasm")]
40 pub use crate::wasm::Timestamp;
41}
42
43
44#[saa_type]
45pub struct Empty {}
46
47#[cfg(feature = "session")]
48impl saa_schema::strum::IntoDiscriminant for Empty {
49 type Discriminant = String;
50 fn discriminant(&self) -> Self::Discriminant {
51 String::from("empty")
52 }
53}
54
55impl core::fmt::Display for Empty {
56 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
57 write!(f, "empty")
58 }
59}