aws-sdk-rust
aws-sdk-rust copied to clipboard
Make ec2 `DescribeInstances` builder `Clone`
Tell us about your request
Many of the request builders in this library implement Clone, but not all of them. The EC2 DescribeInstances request builder appears to only capture Clone values, but is not itself Clone.
Tell us about the problem you're trying to solve.
My underlying goal is to write a generic request paginator trait, so that I can be sure that (up to bugs in request-specific code) pagination is handled consistently and correctly across my codebase. To do so, I use the Clone trait to make copies of the caller's initial request builder, per page, to attach page-specific properties to.
Are you currently working around this issue?
This can somewhat be worked around with a fn that returns a configured builder, rather than cloning an existing builder, but it complicates the definition of my paginator trait to support that.
Additional context
There are probably other builders that should implement Clone but don't. I only know about this one because it affected me.
Think this might be solved by
https://github.com/awslabs/smithy-rs/pull/985
Think this might be solved by
I think that's correct, you could include an integration test in smithy-rs#985 for this specific operation to be sure
This has been obviated by the built-in paginator (which is great!), so I no longer wish for DescribeInstances to be Clone. I wouldn't object, but I also won't need it.
It looks like DescribeInstances implements Clone now.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.