1pub mod adapter_stats;
2pub mod checkpoint;
3pub mod circuit;
4pub mod completion_token;
5pub mod config;
6pub mod config_diagnostics;
7pub mod constants;
8pub mod coordination;
9pub mod deployment;
10pub mod display_url;
11pub mod duration;
12pub mod error;
13pub mod format;
14pub mod json_strings;
15pub mod memory_pressure;
16pub mod pipeline_diff;
17pub mod postprocess;
18pub mod preprocess;
19pub mod program_schema;
20pub mod query;
21pub mod query_params;
22pub mod runtime_status;
23pub mod secret_redaction;
24pub mod secret_ref;
25pub mod secret_resolver;
26pub mod sensitive;
27pub mod serde_with_context;
28pub mod size;
29pub mod suspend;
30pub mod time_series;
31pub mod transaction;
32pub mod transport;
33pub mod variant;
34
35mod serde_via_value {
36 use serde::{
37 Deserialize, Deserializer, Serialize, Serializer,
38 de::{DeserializeOwned, Error},
39 ser::Error as _,
40 };
41
42 pub fn deserialize<'de, D, T>(deserializer: D) -> Result<T, D::Error>
55 where
56 D: Deserializer<'de>,
57 T: DeserializeOwned,
58 {
59 serde_json::from_value(serde_json::Value::deserialize(deserializer)?)
60 .map_err(D::Error::custom)
61 }
62
63 pub fn serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
64 where
65 T: Serialize,
66 S: Serializer,
67 {
68 serde_json::to_value(value)
69 .map_err(S::Error::custom)?
70 .serialize(serializer)
71 }
72}