#[doc = r" Error types."] pub mod error { #[doc = r" Error from a TryFrom or FromStr implementation."] pub struct ConversionError(::std::borrow::Cow<'static, str>); impl ::std::error::Error for ConversionError {} impl ::std::fmt::Display for ConversionError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> { ::std::fmt::Display::fmt(&self.0, f) } } impl ::std::fmt::Debug for ConversionError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> { ::std::fmt::Debug::fmt(&self.0, f) } } impl From<&'static str> for ConversionError { fn from(value: &'static str) -> Self { Self(value.into()) } } impl From for ConversionError { fn from(value: String) -> Self { Self(value.into()) } } } #[doc = "DeadSimple"] #[doc = r""] #[doc = r"
JSON schema"] #[doc = r""] #[doc = r" ```json"] #[doc = "{"] #[doc = " \"title\": \"DeadSimple\","] #[doc = " \"type\": \"object\","] #[doc = " \"$comment\": \"usual case of a map whose name must come from its title\""] #[doc = "}"] #[doc = r" ```"] #[doc = r"
"] #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] pub struct DeadSimple(pub ::serde_json::Map); impl ::std::ops::Deref for DeadSimple { type Target = ::serde_json::Map; fn deref(&self) -> &::serde_json::Map { &self.0 } } impl From for ::serde_json::Map { fn from(value: DeadSimple) -> Self { value.0 } } impl From<&DeadSimple> for DeadSimple { fn from(value: &DeadSimple) -> Self { value.clone() } } impl From<::serde_json::Map> for DeadSimple { fn from(value: ::serde_json::Map) -> Self { Self(value) } } #[doc = "Eh"] #[doc = r""] #[doc = r"
JSON schema"] #[doc = r""] #[doc = r" ```json"] #[doc = "{"] #[doc = " \"type\": \"string\","] #[doc = " \"format\": \"^a*$\""] #[doc = "}"] #[doc = r" ```"] #[doc = r"
"] #[derive( :: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, )] pub struct Eh(pub String); impl ::std::ops::Deref for Eh { type Target = String; fn deref(&self) -> &String { &self.0 } } impl From for String { fn from(value: Eh) -> Self { value.0 } } impl From<&Eh> for Eh { fn from(value: &Eh) -> Self { value.clone() } } impl From for Eh { fn from(value: String) -> Self { Self(value) } } impl std::str::FromStr for Eh { type Err = std::convert::Infallible; fn from_str(value: &str) -> Result { Ok(Self(value.to_string())) } } impl ::std::fmt::Display for Eh { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { self.0.fmt(f) } } #[doc = "MapWithDateKeys"] #[doc = r""] #[doc = r"
JSON schema"] #[doc = r""] #[doc = r" ```json"] #[doc = "{"] #[doc = " \"type\": \"object\","] #[doc = " \"additionalProperties\": {"] #[doc = " \"$ref\": \"#/definitions/Value\""] #[doc = " },"] #[doc = " \"propertyNames\": {"] #[doc = " \"format\": \"date\""] #[doc = " },"] #[doc = " \"$comment\": \"test that a type isn't needed for propertyNames\""] #[doc = "}"] #[doc = r" ```"] #[doc = r"
"] #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] pub struct MapWithDateKeys(pub ::std::collections::HashMap); impl ::std::ops::Deref for MapWithDateKeys { type Target = ::std::collections::HashMap; fn deref(&self) -> &::std::collections::HashMap { &self.0 } } impl From for ::std::collections::HashMap { fn from(value: MapWithDateKeys) -> Self { value.0 } } impl From<&MapWithDateKeys> for MapWithDateKeys { fn from(value: &MapWithDateKeys) -> Self { value.clone() } } impl From<::std::collections::HashMap> for MapWithDateKeys { fn from(value: ::std::collections::HashMap) -> Self { Self(value) } } #[doc = "MapWithDateTimeKeys"] #[doc = r""] #[doc = r"
JSON schema"] #[doc = r""] #[doc = r" ```json"] #[doc = "{"] #[doc = " \"type\": \"object\","] #[doc = " \"additionalProperties\": {"] #[doc = " \"$ref\": \"#/definitions/Value\""] #[doc = " },"] #[doc = " \"propertyNames\": {"] #[doc = " \"format\": \"date-time\""] #[doc = " },"] #[doc = " \"$comment\": \"test that a type isn't needed for propertyNames\""] #[doc = "}"] #[doc = r" ```"] #[doc = r"
"] #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] pub struct MapWithDateTimeKeys( pub ::std::collections::HashMap, Value>, ); impl ::std::ops::Deref for MapWithDateTimeKeys { type Target = ::std::collections::HashMap, Value>; fn deref(&self) -> &::std::collections::HashMap, Value> { &self.0 } } impl From for ::std::collections::HashMap, Value> { fn from(value: MapWithDateTimeKeys) -> Self { value.0 } } impl From<&MapWithDateTimeKeys> for MapWithDateTimeKeys { fn from(value: &MapWithDateTimeKeys) -> Self { value.clone() } } impl From<::std::collections::HashMap, Value>> for MapWithDateTimeKeys { fn from( value: ::std::collections::HashMap, Value>, ) -> Self { Self(value) } } #[doc = "MapWithKeys"] #[doc = r""] #[doc = r"
JSON schema"] #[doc = r""] #[doc = r" ```json"] #[doc = "{"] #[doc = " \"type\": \"object\","] #[doc = " \"additionalProperties\": {"] #[doc = " \"$ref\": \"#/definitions/Value\""] #[doc = " },"] #[doc = " \"propertyNames\": {"] #[doc = " \"$ref\": \"#/definitions/Eh\""] #[doc = " }"] #[doc = "}"] #[doc = r" ```"] #[doc = r"
"] #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] pub struct MapWithKeys(pub ::std::collections::HashMap); impl ::std::ops::Deref for MapWithKeys { type Target = ::std::collections::HashMap; fn deref(&self) -> &::std::collections::HashMap { &self.0 } } impl From for ::std::collections::HashMap { fn from(value: MapWithKeys) -> Self { value.0 } } impl From<&MapWithKeys> for MapWithKeys { fn from(value: &MapWithKeys) -> Self { value.clone() } } impl From<::std::collections::HashMap> for MapWithKeys { fn from(value: ::std::collections::HashMap) -> Self { Self(value) } } #[doc = "Value"] #[doc = r""] #[doc = r"
JSON schema"] #[doc = r""] #[doc = r" ```json"] #[doc = "{"] #[doc = " \"type\": \"string\""] #[doc = "}"] #[doc = r" ```"] #[doc = r"
"] #[derive( :: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, )] pub struct Value(pub String); impl ::std::ops::Deref for Value { type Target = String; fn deref(&self) -> &String { &self.0 } } impl From for String { fn from(value: Value) -> Self { value.0 } } impl From<&Value> for Value { fn from(value: &Value) -> Self { value.clone() } } impl From for Value { fn from(value: String) -> Self { Self(value) } } impl std::str::FromStr for Value { type Err = std::convert::Infallible; fn from_str(value: &str) -> Result { Ok(Self(value.to_string())) } } impl ::std::fmt::Display for Value { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { self.0.fmt(f) } } fn main() {}