From 9d18606b8004b5eb0d3a5952995522c101e10c04 Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 6 Feb 2026 16:49:29 +0000 Subject: [PATCH 1/2] Support for integer enums in rust-server --- .../codegen/languages/RustServerCodegen.java | 27 ++++++++++++++++++- .../resources/rust-server/models.mustache | 5 ++++ .../src/models.rs | 8 +++--- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 39a45900a91a..58ecfeb9f3ce 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -386,7 +386,7 @@ public String toParamName(String name) { @Override public String toEnumValue(String value, String datatype) { - // rust-server templates expect value to be in quotes + // rust-server templates expect value to be in quotes for Display/FromStr return "\"" + super.toEnumValue(value, datatype) + "\""; } @@ -1551,6 +1551,31 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert public ModelsMap postProcessModels(ModelsMap objs) { ModelsMap result = super.postProcessModelsEnum(objs); + // Fix for integer enums: add unquoted numeric values for serde serialization. + // Integer enums should serialize as JSON numbers, not strings. + for (ModelMap modelMap : result.getModels()) { + CodegenModel model = modelMap.getModel(); + + if (Boolean.TRUE.equals(model.isEnum) && + (model.isInteger || model.isLong || model.isNumber) && + model.allowableValues != null) { + + @SuppressWarnings("unchecked") + List> enumVars = + (List>) model.allowableValues.get("enumVars"); + + if (enumVars != null) { + for (Map enumVar : enumVars) { + String value = (String) enumVar.get("value"); + if (value != null) { + // Strip quotes added by toEnumValue() + enumVar.put("numericValue", value.substring(1, value.length() - 1)); + } + } + } + } + } + // Check for model names that conflict with serde_valid macro internals // Once we find one, set a class-level flag that persists across all model batches if (!hasConflictingModelNames) { diff --git a/modules/openapi-generator/src/main/resources/rust-server/models.mustache b/modules/openapi-generator/src/main/resources/rust-server/models.mustache index 62cb60f97ed3..072182e4abaf 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/models.mustache @@ -36,7 +36,12 @@ use crate::header; pub enum {{{classname}}} { {{#allowableValues}} {{#enumVars}} + {{#numericValue}} + #[serde(rename = {{{numericValue}}})] + {{/numericValue}} + {{^numericValue}} #[serde(rename = {{{value}}})] + {{/numericValue}} {{{name}}}, {{/enumVars}} {{/allowableValues}} diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index aa2800e329d3..da9235c9b44a 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -3542,9 +3542,9 @@ impl EnumTest { #[cfg_attr(feature = "validate", derive(Validate))] #[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))] pub enum EnumTestEnumInteger { - #[serde(rename = "1")] + #[serde(rename = 1)] Variant1, - #[serde(rename = "-1")] + #[serde(rename = -1)] Variant12, } @@ -8464,9 +8464,9 @@ impl TestEnumParametersEnumQueryDoubleParameter { #[cfg_attr(feature = "validate", derive(Validate))] #[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))] pub enum TestEnumParametersEnumQueryIntegerParameter { - #[serde(rename = "1")] + #[serde(rename = 1)] Variant1, - #[serde(rename = "-2")] + #[serde(rename = -2)] Variant2, } From 171d77961579ade6bbfe9a1f16e434f7dada3576 Mon Sep 17 00:00:00 2001 From: David Steele Date: Mon, 9 Feb 2026 08:29:06 +0000 Subject: [PATCH 2/2] Support integer enums in rust-server using serde-repr --- .../codegen/languages/RustServerCodegen.java | 35 ++- .../rust-server-deprecated/models.mustache | 4 +- .../main/resources/rust-server/Cargo.mustache | 3 + .../resources/rust-server/models.mustache | 39 ++- .../output/multipart-v3/src/models.rs | 12 +- .../output/no-example-v3/src/models.rs | 4 +- .../output/openapi-v3/src/models.rs | 156 +++++------ .../src/models.rs | 208 +++++++-------- .../output/rust-server-test/src/models.rs | 40 +-- .../output/multipart-v3/src/models.rs | 12 +- .../output/no-example-v3/src/models.rs | 4 +- .../output/openapi-v3/src/models.rs | 156 +++++------ .../Cargo.toml | 1 + .../src/models.rs | 250 +++++++++--------- .../output/rust-server-test/src/models.rs | 40 +-- 15 files changed, 505 insertions(+), 459 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 69e297df8c5f..2d2d4bd508b0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -1565,8 +1565,7 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert public ModelsMap postProcessModels(ModelsMap objs) { ModelsMap result = super.postProcessModelsEnum(objs); - // Fix for integer enums: add unquoted numeric values for serde serialization. - // Integer enums should serialize as JSON numbers, not strings. + // Detect integer enums and mark them for serde_repr usage for (ModelMap modelMap : result.getModels()) { CodegenModel model = modelMap.getModel(); @@ -1574,6 +1573,33 @@ public ModelsMap postProcessModels(ModelsMap objs) { (model.isInteger || model.isLong || model.isNumber) && model.allowableValues != null) { + // Determine the correct Rust type for the enum's repr + String rustType; + if (model.isNumber && !model.isInteger && !model.isLong) { + // Floating point enum - use dataType or default to f64 + rustType = "f32".equals(model.dataType) ? "f32" : "f64"; + } else { + // Integer enum - apply the same type fitting logic as properties + rustType = applyIntegerTypeFitting( + model.getFormat(), + model.getMinimum(), + model.getMaximum(), + model.getExclusiveMinimum(), + model.getExclusiveMaximum()); + // If applyIntegerTypeFitting returns null, default to i32 + if (rustType == null) { + rustType = "i32"; + } + } + + // Mark this as an integer enum and store the Rust type + model.vendorExtensions.put("x-is-integer-enum", true); + model.vendorExtensions.put("x-rust-type", rustType); + + // Set global flag to include serde_repr dependency + additionalProperties.put("apiUsesIntegerEnums", true); + + // Add numeric discriminant values for enum variants @SuppressWarnings("unchecked") List> enumVars = (List>) model.allowableValues.get("enumVars"); @@ -1582,8 +1608,9 @@ public ModelsMap postProcessModels(ModelsMap objs) { for (Map enumVar : enumVars) { String value = (String) enumVar.get("value"); if (value != null) { - // Strip quotes added by toEnumValue() - enumVar.put("numericValue", value.substring(1, value.length() - 1)); + // Strip quotes to get raw numeric value + String numericValue = value.substring(1, value.length() - 1); + enumVar.put("numericDiscriminant", numericValue); } } } diff --git a/modules/openapi-generator/src/main/resources/rust-server-deprecated/models.mustache b/modules/openapi-generator/src/main/resources/rust-server-deprecated/models.mustache index 540c6d87e74d..42eb2e9743f8 100644 --- a/modules/openapi-generator/src/main/resources/rust-server-deprecated/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server-deprecated/models.mustache @@ -579,7 +579,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -595,7 +595,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache index 6aee0343873e..d43d1fe47c2d 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -105,6 +105,9 @@ regex = "1.12" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +{{#apiUsesIntegerEnums}} +serde_repr = "0.1" +{{/apiUsesIntegerEnums}} serde_valid = { version = "2.0", optional = true } validator = { version = "0.20", features = ["derive"] } diff --git a/modules/openapi-generator/src/main/resources/rust-server/models.mustache b/modules/openapi-generator/src/main/resources/rust-server/models.mustache index 072182e4abaf..7d14452128cf 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/models.mustache @@ -28,27 +28,39 @@ use crate::header; /// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] +{{#vendorExtensions.x-is-integer-enum}} +#[repr({{{vendorExtensions.x-rust-type}}})] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde_repr::Serialize_repr, serde_repr::Deserialize_repr, Hash)] +{{/vendorExtensions.x-is-integer-enum}} +{{^vendorExtensions.x-is-integer-enum}} #[repr(C)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize, Hash)] +{{/vendorExtensions.x-is-integer-enum}} {{^hasConflictingModelNames}}{{^exts.x-skip-serde-valid}}#[cfg_attr(feature = "validate", derive(Validate))]{{/exts.x-skip-serde-valid}}{{/hasConflictingModelNames}} #[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))]{{#xmlName}} #[serde(rename = "{{{.}}}")]{{/xmlName}} pub enum {{{classname}}} { {{#allowableValues}} {{#enumVars}} - {{#numericValue}} - #[serde(rename = {{{numericValue}}})] - {{/numericValue}} - {{^numericValue}} + {{^vendorExtensions.x-is-integer-enum}} #[serde(rename = {{{value}}})] - {{/numericValue}} + {{/vendorExtensions.x-is-integer-enum}} + {{#numericDiscriminant}} + {{{name}}} = {{{numericDiscriminant}}}, + {{/numericDiscriminant}} + {{^numericDiscriminant}} {{{name}}}, + {{/numericDiscriminant}} {{/enumVars}} {{/allowableValues}} } impl std::fmt::Display for {{{classname}}} { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +{{#vendorExtensions.x-is-integer-enum}} + write!(f, "{}", *self as {{{vendorExtensions.x-rust-type}}}) +{{/vendorExtensions.x-is-integer-enum}} +{{^vendorExtensions.x-is-integer-enum}} match *self { {{#allowableValues}} {{#enumVars}} @@ -56,6 +68,7 @@ impl std::fmt::Display for {{{classname}}} { {{/enumVars}} {{/allowableValues}} } +{{/vendorExtensions.x-is-integer-enum}} } } @@ -63,6 +76,17 @@ impl std::str::FromStr for {{{classname}}} { type Err = String; fn from_str(s: &str) -> std::result::Result { +{{#vendorExtensions.x-is-integer-enum}} + match s.parse::<{{{vendorExtensions.x-rust-type}}}>() { +{{#allowableValues}} + {{#enumVars}} + std::result::Result::Ok({{{numericDiscriminant}}}) => std::result::Result::Ok({{{classname}}}::{{{name}}}), + {{/enumVars}} +{{/allowableValues}} + _ => std::result::Result::Err(format!("Value not valid: {s}")), + } +{{/vendorExtensions.x-is-integer-enum}} +{{^vendorExtensions.x-is-integer-enum}} match s { {{#allowableValues}} {{#enumVars}} @@ -71,6 +95,7 @@ impl std::str::FromStr for {{{classname}}} { {{/allowableValues}} _ => std::result::Result::Err(format!("Value not valid: {s}")), } +{{/vendorExtensions.x-is-integer-enum}} } } {{/isEnum}} @@ -634,7 +659,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -650,7 +675,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server-deprecated/output/multipart-v3/src/models.rs b/samples/server/petstore/rust-server-deprecated/output/multipart-v3/src/models.rs index c62579b5433a..3e1d69799de4 100644 --- a/samples/server/petstore/rust-server-deprecated/output/multipart-v3/src/models.rs +++ b/samples/server/petstore/rust-server-deprecated/output/multipart-v3/src/models.rs @@ -137,7 +137,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -153,7 +153,7 @@ impl std::convert::TryFrom> } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -307,7 +307,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -323,7 +323,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -471,7 +471,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -487,7 +487,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server-deprecated/output/no-example-v3/src/models.rs b/samples/server/petstore/rust-server-deprecated/output/no-example-v3/src/models.rs index 06440d8071b0..f71528ab1b64 100644 --- a/samples/server/petstore/rust-server-deprecated/output/no-example-v3/src/models.rs +++ b/samples/server/petstore/rust-server-deprecated/output/no-example-v3/src/models.rs @@ -120,7 +120,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -136,7 +136,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server-deprecated/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-server-deprecated/output/openapi-v3/src/models.rs index f3008fdd34b2..f1c3ea082be1 100644 --- a/samples/server/petstore/rust-server-deprecated/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-server-deprecated/output/openapi-v3/src/models.rs @@ -93,7 +93,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -109,7 +109,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -230,7 +230,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -246,7 +246,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -410,7 +410,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -426,7 +426,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -603,7 +603,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -619,7 +619,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -733,7 +733,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -749,7 +749,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -905,7 +905,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -921,7 +921,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1051,7 +1051,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1067,7 +1067,7 @@ impl std::convert::TryFrom>> fo } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1189,7 +1189,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1205,7 +1205,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1327,7 +1327,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1343,7 +1343,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1449,7 +1449,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1465,7 +1465,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1624,7 +1624,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1640,7 +1640,7 @@ impl std::convert::TryFrom>> for hype } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1806,7 +1806,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1822,7 +1822,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1942,7 +1942,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1958,7 +1958,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2071,7 +2071,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2087,7 +2087,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2200,7 +2200,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2216,7 +2216,7 @@ impl std::convert::TryFrom>> for hyper::heade } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2318,7 +2318,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2334,7 +2334,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2456,7 +2456,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2472,7 +2472,7 @@ impl std::convert::TryFrom>> } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2582,7 +2582,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2598,7 +2598,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2752,7 +2752,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2768,7 +2768,7 @@ impl std::convert::TryFrom>> } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2891,7 +2891,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2907,7 +2907,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3068,7 +3068,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3084,7 +3084,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3208,7 +3208,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3224,7 +3224,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3337,7 +3337,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3353,7 +3353,7 @@ impl std::convert::TryFrom>> for hyp } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3616,7 +3616,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3632,7 +3632,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3796,7 +3796,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3812,7 +3812,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3979,7 +3979,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3995,7 +3995,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4171,7 +4171,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4187,7 +4187,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4340,7 +4340,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4356,7 +4356,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4469,7 +4469,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4485,7 +4485,7 @@ impl std::convert::TryFrom>> for hyper::header:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4606,7 +4606,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4622,7 +4622,7 @@ impl std::convert::TryFrom>> fo } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4745,7 +4745,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4761,7 +4761,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4884,7 +4884,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4900,7 +4900,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5013,7 +5013,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5029,7 +5029,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5135,7 +5135,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5151,7 +5151,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5264,7 +5264,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5280,7 +5280,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5404,7 +5404,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5420,7 +5420,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5597,7 +5597,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5613,7 +5613,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5727,7 +5727,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5743,7 +5743,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5914,7 +5914,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5930,7 +5930,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server-deprecated/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-server-deprecated/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index 4ab8b1568999..0e82f7a4a002 100644 --- a/samples/server/petstore/rust-server-deprecated/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-server-deprecated/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -128,7 +128,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -144,7 +144,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -308,7 +308,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -324,7 +324,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -485,7 +485,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -501,7 +501,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -685,7 +685,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -701,7 +701,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -849,7 +849,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -865,7 +865,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1018,7 +1018,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1034,7 +1034,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1214,7 +1214,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1230,7 +1230,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1460,7 +1460,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1476,7 +1476,7 @@ impl std::convert::TryFrom>> for hyp } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1655,7 +1655,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1671,7 +1671,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1841,7 +1841,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1857,7 +1857,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2012,7 +2012,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2028,7 +2028,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2182,7 +2182,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2198,7 +2198,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2377,7 +2377,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2393,7 +2393,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2548,7 +2548,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2564,7 +2564,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2731,7 +2731,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2747,7 +2747,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2853,7 +2853,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2869,7 +2869,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2975,7 +2975,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2991,7 +2991,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3097,7 +3097,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3113,7 +3113,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3223,7 +3223,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3239,7 +3239,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3427,7 +3427,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3443,7 +3443,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3549,7 +3549,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3565,7 +3565,7 @@ impl std::convert::TryFrom>> fo } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3675,7 +3675,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3691,7 +3691,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3801,7 +3801,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3817,7 +3817,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4150,7 +4150,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4166,7 +4166,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4335,7 +4335,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4351,7 +4351,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4505,7 +4505,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4521,7 +4521,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4687,7 +4687,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4703,7 +4703,7 @@ impl std::convert::TryFrom>> for hyper::hea } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4809,7 +4809,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4825,7 +4825,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4993,7 +4993,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5009,7 +5009,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5180,7 +5180,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5196,7 +5196,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5392,7 +5392,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5408,7 +5408,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5562,7 +5562,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5578,7 +5578,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5727,7 +5727,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5743,7 +5743,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5864,7 +5864,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5880,7 +5880,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6100,7 +6100,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6116,7 +6116,7 @@ impl std::convert::TryFrom>> for hyper::heade } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6227,7 +6227,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6243,7 +6243,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6366,7 +6366,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6382,7 +6382,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6566,7 +6566,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6582,7 +6582,7 @@ impl std::convert::TryFrom>> for hyp } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6692,7 +6692,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6708,7 +6708,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6831,7 +6831,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6847,7 +6847,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6960,7 +6960,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6976,7 +6976,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7179,7 +7179,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7195,7 +7195,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7306,7 +7306,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7322,7 +7322,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7491,7 +7491,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7507,7 +7507,7 @@ impl std::convert::TryFrom>> for hype } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7663,7 +7663,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7679,7 +7679,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7849,7 +7849,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7865,7 +7865,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7971,7 +7971,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7987,7 +7987,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8097,7 +8097,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8113,7 +8113,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8219,7 +8219,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8235,7 +8235,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8341,7 +8341,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8357,7 +8357,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8468,7 +8468,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8484,7 +8484,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8745,7 +8745,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8761,7 +8761,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server-deprecated/output/rust-server-test/src/models.rs b/samples/server/petstore/rust-server-deprecated/output/rust-server-test/src/models.rs index 8c288de93243..ab3a6a63bb36 100644 --- a/samples/server/petstore/rust-server-deprecated/output/rust-server-test/src/models.rs +++ b/samples/server/petstore/rust-server-deprecated/output/rust-server-test/src/models.rs @@ -135,7 +135,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -151,7 +151,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -264,7 +264,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -280,7 +280,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -440,7 +440,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -456,7 +456,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -601,7 +601,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -617,7 +617,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -772,7 +772,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -788,7 +788,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -935,7 +935,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -951,7 +951,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1092,7 +1092,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1108,7 +1108,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1263,7 +1263,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1279,7 +1279,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1428,7 +1428,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1444,7 +1444,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1558,7 +1558,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1574,7 +1574,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/models.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/models.rs index b86871d13aec..99f65c171257 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/models.rs @@ -142,7 +142,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -158,7 +158,7 @@ impl std::convert::TryFrom> } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -314,7 +314,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -330,7 +330,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -480,7 +480,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -496,7 +496,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs b/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs index 04df69c8589d..584da04627f6 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs @@ -122,7 +122,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -138,7 +138,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs index 64d8c80a8d4c..4fb4c803c5ae 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs @@ -94,7 +94,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -110,7 +110,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -234,7 +234,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -250,7 +250,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -416,7 +416,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -432,7 +432,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -611,7 +611,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -627,7 +627,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -744,7 +744,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -760,7 +760,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -917,7 +917,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -933,7 +933,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1066,7 +1066,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1082,7 +1082,7 @@ impl std::convert::TryFrom>> fo } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1207,7 +1207,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1223,7 +1223,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1348,7 +1348,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1364,7 +1364,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1471,7 +1471,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1487,7 +1487,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1648,7 +1648,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1664,7 +1664,7 @@ impl std::convert::TryFrom>> for hype } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1832,7 +1832,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1848,7 +1848,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1969,7 +1969,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1985,7 +1985,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2101,7 +2101,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2117,7 +2117,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2233,7 +2233,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2249,7 +2249,7 @@ impl std::convert::TryFrom>> for hyper::heade } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2352,7 +2352,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2368,7 +2368,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2493,7 +2493,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2509,7 +2509,7 @@ impl std::convert::TryFrom>> } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2620,7 +2620,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2636,7 +2636,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2791,7 +2791,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2807,7 +2807,7 @@ impl std::convert::TryFrom>> } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2933,7 +2933,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2949,7 +2949,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3111,7 +3111,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3127,7 +3127,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3254,7 +3254,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3270,7 +3270,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3386,7 +3386,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3402,7 +3402,7 @@ impl std::convert::TryFrom>> for hyp } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3673,7 +3673,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3689,7 +3689,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3855,7 +3855,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3871,7 +3871,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4040,7 +4040,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4056,7 +4056,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4236,7 +4236,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4252,7 +4252,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4406,7 +4406,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4422,7 +4422,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4538,7 +4538,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4554,7 +4554,7 @@ impl std::convert::TryFrom>> for hyper::header:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4678,7 +4678,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4694,7 +4694,7 @@ impl std::convert::TryFrom>> fo } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4820,7 +4820,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4836,7 +4836,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4962,7 +4962,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4978,7 +4978,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5094,7 +5094,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5110,7 +5110,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5217,7 +5217,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5233,7 +5233,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5349,7 +5349,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5365,7 +5365,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5492,7 +5492,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5508,7 +5508,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5687,7 +5687,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5703,7 +5703,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5820,7 +5820,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5836,7 +5836,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6009,7 +6009,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6025,7 +6025,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml index 5e0ea94e4048..bbd471351888 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml @@ -57,6 +57,7 @@ regex = "1.12" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +serde_repr = "0.1" serde_valid = { version = "2.0", optional = true } validator = { version = "0.20", features = ["derive"] } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index da9235c9b44a..aeeb689feb7f 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -131,7 +131,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -147,7 +147,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -313,7 +313,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -329,7 +329,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -491,7 +491,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -507,7 +507,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -694,7 +694,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -710,7 +710,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -859,7 +859,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -875,7 +875,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1029,7 +1029,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1045,7 +1045,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1231,7 +1231,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1247,7 +1247,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1483,7 +1483,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1499,7 +1499,7 @@ impl std::convert::TryFrom>> for hyp } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1681,7 +1681,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1697,7 +1697,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1869,7 +1869,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1885,7 +1885,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2041,7 +2041,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2057,7 +2057,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2212,7 +2212,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2228,7 +2228,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2410,7 +2410,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2426,7 +2426,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2582,7 +2582,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2598,7 +2598,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2771,7 +2771,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2787,7 +2787,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -2894,7 +2894,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -2910,7 +2910,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3017,7 +3017,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3033,7 +3033,7 @@ impl std::convert::TryFrom } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3140,7 +3140,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3156,7 +3156,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3267,7 +3267,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3283,7 +3283,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3481,7 +3481,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3497,7 +3497,7 @@ impl std::convert::TryFrom>> for hyper::he } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3537,23 +3537,18 @@ impl EnumTest { /// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] -#[repr(C)] -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize, Hash)] +#[repr(i32)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde_repr::Serialize_repr, serde_repr::Deserialize_repr, Hash)] #[cfg_attr(feature = "validate", derive(Validate))] #[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))] pub enum EnumTestEnumInteger { - #[serde(rename = 1)] - Variant1, - #[serde(rename = -1)] - Variant12, + Variant1 = 1, + Variant12 = -1, } impl std::fmt::Display for EnumTestEnumInteger { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match *self { - EnumTestEnumInteger::Variant1 => write!(f, "1"), - EnumTestEnumInteger::Variant12 => write!(f, "-1"), - } + write!(f, "{}", *self as i32) } } @@ -3561,9 +3556,9 @@ impl std::str::FromStr for EnumTestEnumInteger { type Err = String; fn from_str(s: &str) -> std::result::Result { - match s { - "1" => std::result::Result::Ok(EnumTestEnumInteger::Variant1), - "-1" => std::result::Result::Ok(EnumTestEnumInteger::Variant12), + match s.parse::() { + std::result::Result::Ok(1) => std::result::Result::Ok(EnumTestEnumInteger::Variant1), + std::result::Result::Ok(-1) => std::result::Result::Ok(EnumTestEnumInteger::Variant12), _ => std::result::Result::Err(format!("Value not valid: {s}")), } } @@ -3604,7 +3599,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3620,7 +3615,7 @@ impl std::convert::TryFrom>> fo } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3731,7 +3726,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3747,7 +3742,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -3858,7 +3853,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -3874,7 +3869,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4234,7 +4229,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4250,7 +4245,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4421,7 +4416,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4437,7 +4432,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4592,7 +4587,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4608,7 +4603,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4779,7 +4774,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4795,7 +4790,7 @@ impl std::convert::TryFrom>> for hyper::hea } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -4902,7 +4897,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -4918,7 +4913,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5090,7 +5085,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5106,7 +5101,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5279,7 +5274,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5295,7 +5290,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5495,7 +5490,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5511,7 +5506,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5666,7 +5661,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5682,7 +5677,7 @@ impl std::convert::TryFrom>> for hyper:: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5833,7 +5828,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5849,7 +5844,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -5982,7 +5977,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -5998,7 +5993,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6225,7 +6220,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6241,7 +6236,7 @@ impl std::convert::TryFrom>> for hyper::heade } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6353,7 +6348,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6369,7 +6364,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6504,7 +6499,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6520,7 +6515,7 @@ impl std::convert::TryFrom>> for hyper } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6707,7 +6702,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6723,7 +6718,7 @@ impl std::convert::TryFrom>> for hyp } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6834,7 +6829,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -6850,7 +6845,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -6985,7 +6980,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7001,7 +6996,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7126,7 +7121,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7142,7 +7137,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7354,7 +7349,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7370,7 +7365,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7482,7 +7477,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7498,7 +7493,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7669,7 +7664,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7685,7 +7680,7 @@ impl std::convert::TryFrom>> for hype } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -7842,7 +7837,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -7858,7 +7853,7 @@ impl std::convert::TryFrom>> for hyper::head } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8030,7 +8025,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8046,7 +8041,7 @@ impl std::convert::TryFrom>> for hyper::header: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8153,7 +8148,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8169,7 +8164,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8280,7 +8275,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8296,7 +8291,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8403,7 +8398,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8419,7 +8414,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8459,23 +8454,18 @@ impl TestEnumParametersEnumQueryDoubleParameter { /// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] -#[repr(C)] -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize, Hash)] +#[repr(i32)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde_repr::Serialize_repr, serde_repr::Deserialize_repr, Hash)] #[cfg_attr(feature = "validate", derive(Validate))] #[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))] pub enum TestEnumParametersEnumQueryIntegerParameter { - #[serde(rename = 1)] - Variant1, - #[serde(rename = -2)] - Variant2, + Variant1 = 1, + Variant2 = -2, } impl std::fmt::Display for TestEnumParametersEnumQueryIntegerParameter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match *self { - TestEnumParametersEnumQueryIntegerParameter::Variant1 => write!(f, "1"), - TestEnumParametersEnumQueryIntegerParameter::Variant2 => write!(f, "-2"), - } + write!(f, "{}", *self as i32) } } @@ -8483,9 +8473,9 @@ impl std::str::FromStr for TestEnumParametersEnumQueryIntegerParameter { type Err = String; fn from_str(s: &str) -> std::result::Result { - match s { - "1" => std::result::Result::Ok(TestEnumParametersEnumQueryIntegerParameter::Variant1), - "-2" => std::result::Result::Ok(TestEnumParametersEnumQueryIntegerParameter::Variant2), + match s.parse::() { + std::result::Result::Ok(1) => std::result::Result::Ok(TestEnumParametersEnumQueryIntegerParameter::Variant1), + std::result::Result::Ok(-2) => std::result::Result::Ok(TestEnumParametersEnumQueryIntegerParameter::Variant2), _ => std::result::Result::Err(format!("Value not valid: {s}")), } } @@ -8526,7 +8516,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8542,7 +8532,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8654,7 +8644,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8670,7 +8660,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -8939,7 +8929,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -8955,7 +8945,7 @@ impl std::convert::TryFrom>> for hyper::header } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs index 596621970466..cfd9f492b576 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs @@ -138,7 +138,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -154,7 +154,7 @@ impl std::convert::TryFrom>> for } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -279,7 +279,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -295,7 +295,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -457,7 +457,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -473,7 +473,7 @@ impl std::convert::TryFrom>> for hyper: } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -619,7 +619,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -635,7 +635,7 @@ impl std::convert::TryFrom>> for hyper::h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -792,7 +792,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -808,7 +808,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -956,7 +956,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -972,7 +972,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1115,7 +1115,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1131,7 +1131,7 @@ impl std::convert::TryFrom>> for hy } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1288,7 +1288,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1304,7 +1304,7 @@ impl std::convert::TryFrom>> f } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1456,7 +1456,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1472,7 +1472,7 @@ impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String; @@ -1600,7 +1600,7 @@ impl std::convert::TryFrom for header::IntoHeaderVal } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom>> for hyper::header::HeaderValue { type Error = String; @@ -1616,7 +1616,7 @@ impl std::convert::TryFrom>> for h } } -#[cfg(feature = "server")] +#[cfg(any(feature = "client", feature = "server"))] impl std::convert::TryFrom for header::IntoHeaderValue> { type Error = String;