You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to use Request::into_parts() and still have access to the helper methods for getting AWS-specific data. With that in mind, I would like to propose breaking RequestExt into two traits. RequestExt and ExtensionsExt (if someone has a better name, please suggest it).
The existing trait and its impl resemble this (as of #602):
There are multiple breaking changes in this proposal.
Not only would users wanting extension methods other than payload() need to import a new trait (ExtensionsExt), the methods on that trait have changed from what existed in RequestExt. Specifically, the *_ref(&self) -> Option<&T> methods introduced in #602 have been renamed without the _ref suffix, replacing the methods that existed prior to #602. A benefit is that it removes methods that silently clone, and may panic.
Comments on closed issues are hard for the maintainers of this repository to see.
If you need more assistance, please 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.
It would be nice to be able to use
Request::into_parts()
and still have access to the helper methods for getting AWS-specific data. With that in mind, I would like to propose breakingRequestExt
into two traits.RequestExt
andExtensionsExt
(if someone has a better name, please suggest it).The existing trait and its
impl
resemble this (as of #602):What I am proposing resembles this:
There are multiple breaking changes in this proposal.
Not only would users wanting extension methods other than
payload()
need to import a new trait (ExtensionsExt
), the methods on that trait have changed from what existed inRequestExt
. Specifically, the*_ref(&self) -> Option<&T>
methods introduced in #602 have been renamed without the_ref
suffix, replacing the methods that existed prior to #602. A benefit is that it removes methods that silently clone, and may panic.The method signatures that change are:
fn raw_http_path(&self) -> String
becomesfn raw_http_path(&self) -> &str
fn with_raw_http_path(self, path: &str) -> Self
becomesfn with_raw_http_path<S: Into<String>>(self, path: S) -> Self
fn query_string_parameters(&self) -> QueryMap
becomesfn query_string_parameters(&self) -> Option<&QueryMap>
fn path_parameters(&self) -> QueryMap
becomesfn path_parameters(&self) -> Option<&QueryMap>
fn stage_variables(&self) -> QueryMap
becomesfn stage_variables(&self) -> Option<&QueryMap>
fn request_context(&self) -> RequestContext
becomesfn request_context(&self) -> Option<&RequestContext>
fn lambda_context(&self) -> Context
becomesfn lambda_context(&self) -> Option<&Context>
Thoughts?
The text was updated successfully, but these errors were encountered: