schemars/json_schema_impls/
mod.rs
1macro_rules! no_ref_schema {
2 () => {
3 fn is_referenceable() -> bool {
4 false
5 }
6 };
7}
8
9macro_rules! forward_impl {
10 (($($impl:tt)+) => $target:ty) => {
11 impl $($impl)+ {
12 fn is_referenceable() -> bool {
13 <$target>::is_referenceable()
14 }
15
16 fn schema_name() -> String {
17 <$target>::schema_name()
18 }
19
20 fn schema_id() -> std::borrow::Cow<'static, str> {
21 <$target>::schema_id()
22 }
23
24 fn json_schema(gen: &mut SchemaGenerator) -> Schema {
25 <$target>::json_schema(gen)
26 }
27
28 fn _schemars_private_non_optional_json_schema(gen: &mut SchemaGenerator) -> Schema {
29 <$target>::_schemars_private_non_optional_json_schema(gen)
30 }
31
32 fn _schemars_private_is_option() -> bool {
33 <$target>::_schemars_private_is_option()
34 }
35 }
36 };
37 ($ty:ty => $target:ty) => {
38 forward_impl!((JsonSchema for $ty) => $target);
39 };
40}
41
42mod array;
43#[cfg(feature = "arrayvec05")]
44mod arrayvec05;
45#[cfg(feature = "arrayvec07")]
46mod arrayvec07;
47#[cfg(std_atomic)]
48mod atomic;
49#[cfg(feature = "bytes")]
50mod bytes;
51#[cfg(feature = "chrono")]
52mod chrono;
53mod core;
54#[cfg(any(
55 feature = "rust_decimal",
56 feature = "bigdecimal03",
57 feature = "bigdecimal04"
58))]
59mod decimal;
60#[cfg(feature = "either")]
61mod either;
62#[cfg(feature = "enumset")]
63mod enumset;
64mod ffi;
65#[cfg(feature = "indexmap")]
66mod indexmap;
67#[cfg(feature = "indexmap2")]
68mod indexmap2;
69mod maps;
70mod nonzero_signed;
71mod nonzero_unsigned;
72mod primitives;
73#[cfg(feature = "semver")]
74mod semver;
75mod sequences;
76mod serdejson;
77#[cfg(feature = "smallvec")]
78mod smallvec;
79#[cfg(feature = "smol_str")]
80mod smol_str;
81mod time;
82mod tuple;
83#[cfg(feature = "url")]
84mod url;
85#[cfg(feature = "uuid08")]
86mod uuid08;
87#[cfg(feature = "uuid1")]
88mod uuid1;
89mod wrapper;