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.
Trait Implementations§
source§impl HttpHeaders for Response
impl HttpHeaders for Response
source§fn http_headers(&self) -> &HeaderMap<HeaderValue>
fn http_headers(&self) -> &HeaderMap<HeaderValue>
Returns a reference to the associated header map.
source§fn http_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue>
fn http_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue>
Returns a mutable reference to the associated header map.
Auto Trait Implementations§
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more