Loading Cargo.toml +1 −1 Original line number Diff line number Diff line [workspace] members = ["crates/*", "codegen"] resolver = "2" resolver = "3" [workspace.package] edition = "2024" Loading codegen/Cargo.toml +3 −1 Original line number Diff line number Diff line [package] name = "s3s-codegen" version = "0.0.0" edition = "2021" edition.workspace = true repository.workspace = true license.workspace = true publish = false [lints] Loading codegen/src/v1/aws_conv.rs +1 −1 Original line number Diff line number Diff line use super::dto::RustTypes; use super::ops::is_op_input; use super::ops::Operations; use super::ops::is_op_input; use super::rust; use crate::declare_codegen; Loading codegen/src/v1/dto.rs +1 −1 Original line number Diff line number Diff line use super::o; use super::ops::{is_op_input, Operations, SKIPPED_OPS}; use super::ops::{Operations, SKIPPED_OPS, is_op_input}; use super::rust::codegen_doc; use super::smithy::SmithyTraitsExt; use super::{rust, smithy}; Loading codegen/src/v1/ops.rs +9 −3 Original line number Diff line number Diff line Loading @@ -345,7 +345,9 @@ fn codegen_op_http_ser(op: &Operation, rust_types: &RustTypes) { if let rust::Type::Timestamp(ts_ty) = field_type { assert!(field.option_type); let fmt = ts_ty.format.as_deref().unwrap_or("HttpDate"); g!("http::add_opt_header_timestamp(&mut res, {header_name}, x.{field_name}, TimestampFormat::{fmt})?;"); g!( "http::add_opt_header_timestamp(&mut res, {header_name}, x.{field_name}, TimestampFormat::{fmt})?;" ); } else if field.option_type { g!("http::add_opt_header(&mut res, {header_name}, x.{field_name})?;"); } else { Loading Loading @@ -684,8 +686,12 @@ fn codegen_op_http_call(op: &Operation) { g!("}}"); g!("}};"); g!("let mut resp = http::Response::with_status(http::StatusCode::OK);"); g!("http::set_keep_alive_xml_body(&mut resp, sync_wrapper::SyncFuture::new(fut), std::time::Duration::from_millis(100))?;"); g!("http::add_opt_header(&mut resp, \"trailer\", Some([X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED.as_str(), X_AMZ_EXPIRATION.as_str(), X_AMZ_REQUEST_CHARGED.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION.as_str(), X_AMZ_VERSION_ID.as_str()].join(\",\")))?;"); g!( "http::set_keep_alive_xml_body(&mut resp, sync_wrapper::SyncFuture::new(fut), std::time::Duration::from_millis(100))?;" ); g!( "http::add_opt_header(&mut resp, \"trailer\", Some([X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED.as_str(), X_AMZ_EXPIRATION.as_str(), X_AMZ_REQUEST_CHARGED.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION.as_str(), X_AMZ_VERSION_ID.as_str()].join(\",\")))?;" ); } else { g!("let result = s3.{method}(s3_req).await;"); Loading Loading
Cargo.toml +1 −1 Original line number Diff line number Diff line [workspace] members = ["crates/*", "codegen"] resolver = "2" resolver = "3" [workspace.package] edition = "2024" Loading
codegen/Cargo.toml +3 −1 Original line number Diff line number Diff line [package] name = "s3s-codegen" version = "0.0.0" edition = "2021" edition.workspace = true repository.workspace = true license.workspace = true publish = false [lints] Loading
codegen/src/v1/aws_conv.rs +1 −1 Original line number Diff line number Diff line use super::dto::RustTypes; use super::ops::is_op_input; use super::ops::Operations; use super::ops::is_op_input; use super::rust; use crate::declare_codegen; Loading
codegen/src/v1/dto.rs +1 −1 Original line number Diff line number Diff line use super::o; use super::ops::{is_op_input, Operations, SKIPPED_OPS}; use super::ops::{Operations, SKIPPED_OPS, is_op_input}; use super::rust::codegen_doc; use super::smithy::SmithyTraitsExt; use super::{rust, smithy}; Loading
codegen/src/v1/ops.rs +9 −3 Original line number Diff line number Diff line Loading @@ -345,7 +345,9 @@ fn codegen_op_http_ser(op: &Operation, rust_types: &RustTypes) { if let rust::Type::Timestamp(ts_ty) = field_type { assert!(field.option_type); let fmt = ts_ty.format.as_deref().unwrap_or("HttpDate"); g!("http::add_opt_header_timestamp(&mut res, {header_name}, x.{field_name}, TimestampFormat::{fmt})?;"); g!( "http::add_opt_header_timestamp(&mut res, {header_name}, x.{field_name}, TimestampFormat::{fmt})?;" ); } else if field.option_type { g!("http::add_opt_header(&mut res, {header_name}, x.{field_name})?;"); } else { Loading Loading @@ -684,8 +686,12 @@ fn codegen_op_http_call(op: &Operation) { g!("}}"); g!("}};"); g!("let mut resp = http::Response::with_status(http::StatusCode::OK);"); g!("http::set_keep_alive_xml_body(&mut resp, sync_wrapper::SyncFuture::new(fut), std::time::Duration::from_millis(100))?;"); g!("http::add_opt_header(&mut resp, \"trailer\", Some([X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED.as_str(), X_AMZ_EXPIRATION.as_str(), X_AMZ_REQUEST_CHARGED.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION.as_str(), X_AMZ_VERSION_ID.as_str()].join(\",\")))?;"); g!( "http::set_keep_alive_xml_body(&mut resp, sync_wrapper::SyncFuture::new(fut), std::time::Duration::from_millis(100))?;" ); g!( "http::add_opt_header(&mut resp, \"trailer\", Some([X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED.as_str(), X_AMZ_EXPIRATION.as_str(), X_AMZ_REQUEST_CHARGED.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID.as_str(), X_AMZ_SERVER_SIDE_ENCRYPTION.as_str(), X_AMZ_VERSION_ID.as_str()].join(\",\")))?;" ); } else { g!("let result = s3.{method}(s3_req).await;"); Loading