Struct aws_smithy_http::operation::Response
source · pub struct Response { /* private fields */ }
Expand description
Operation response type that associates a property bag with an underlying HTTP response.
This type represents the response in the Tower Service
in middleware so that middleware
can share information with each other via the properties.
Implementations§
source§impl Response
impl Response
sourcepub fn new(inner: Response<SdkBody>) -> Self
pub fn new(inner: Response<SdkBody>) -> Self
Creates a new operation Response
with the given inner
HTTP response.
sourcepub fn properties_mut(&mut self) -> impl DerefMut<Target = PropertyBag> + '_
pub fn properties_mut(&mut self) -> impl DerefMut<Target = PropertyBag> + '_
Gives mutable access to the properties.
sourcepub fn properties(&self) -> impl Deref<Target = PropertyBag> + '_
pub fn properties(&self) -> impl Deref<Target = PropertyBag> + '_
Gives readonly access to the properties.
sourcepub fn http_mut(&mut self) -> &mut Response<SdkBody>
pub fn http_mut(&mut self) -> &mut Response<SdkBody>
Gives mutable access to the underlying HTTP response.
sourcepub fn http(&self) -> &Response<SdkBody>
pub fn http(&self) -> &Response<SdkBody>
Gives readonly access to the underlying HTTP response.
sourcepub fn into_parts(self) -> (Response<SdkBody>, SharedPropertyBag)
pub fn into_parts(self) -> (Response<SdkBody>, SharedPropertyBag)
Consumes the operation Request
and returns the underlying HTTP response and properties.
sourcepub fn parts_mut(
&mut self
) -> (&mut Response<SdkBody>, impl DerefMut<Target = PropertyBag> + '_)
pub fn parts_mut( &mut self ) -> (&mut Response<SdkBody>, impl DerefMut<Target = PropertyBag> + '_)
Return mutable references to the response and property bag contained within this operation::Response
sourcepub fn from_parts(
inner: Response<SdkBody>,
properties: SharedPropertyBag
) -> Self
pub fn from_parts( inner: Response<SdkBody>, properties: SharedPropertyBag ) -> Self
Creates a new operation Response
from an HTTP response and property bag.