Skip to content
Unverified Commit 65035d5b authored by Zelda Hessler's avatar Zelda Hessler Committed by GitHub
Browse files

Add codegen helper for defining operation-specific `CustomizableOperation` methods. (#3918)

This PR lays the groundwork for defining operation-specific
`CustomizableOperation` methods.

## Codegen Example

If we were to define pre-signable ops this way, code like the following
would be emitted for each op that supported presigning.

```rust
impl<E, B> CustomizableOperation<crate::operation::put_object::PutObject, E, B> {
    /// Sends the request and returns the response.
    #[allow(unused_mut)]
    pub async fn presigned(
        mut self,
        presigning_config: crate::presigning::PresigningConfig,
    ) -> ::std::result::Result<crate::presigning::PresignedRequest, crate::error::SdkError<E>>
    where
        E: std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
        B: crate::client::customize::internal::CustomizablePresigned<E>,
    {
        self.execute(move |sender, conf| sender.presign(conf, presigning_config)).await
    }
}
```

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 104797d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment