Open
Description
Describe the feature
It allows you to define/save models with file format supported by serde.
Once this feature is implemented you can,
- save your input to disk in your favourite file format
- load your input from disk using serde
Use Case
It allows you to define/save models with file format supported by serde.
Once this feature is implemented you can,
- save your input to disk in your favourite file format
- load your input from disk using serde
Proposed Solution
add new function fn with_builder()
to any structs that implements async fn send()
.
pub struct CopyObject {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::copy_object_input::Builder,
}
impl CopyObject {
pub(crate) fn with_builder(handle: std::sync::Arc<super::Handle>, inner: crate::input::copy_object_input::Builder) -> Self {
Self {
handle,
inner
}
}
}
mod copy_object_input {
#[derive(std::clone::Clone, std::fmt::Debug, serde::Serialize, serde::Deserialize)]
struct Builder {
...
}
}
let s3_client = aws_sdk_s3::Client::from(config).copy_object();
let copy_object: CopyObject = s3_client
.copy_object()
.with_builder(serde_json::from_str(std::fs::read_to_string("copy_object.json").unwrap()).unwrap())
copy_object.send().await;
Other Information
Potential concerns
- Binary size may become bigger
- Compilation time may increase
- You might want to add
#[cfg(feature = "serde")]
or something to address the concerns that mentioned above.
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
A note for the community
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue, please leave a comment