Struct aws_smithy_http::operation::Operation
source · pub struct Operation<H, R> { /* private fields */ }
Expand description
An Operation
is a request paired with a response handler, retry classifier,
and metadata that identifies the API being called.
Generics:
H
: Response handlerR
: Implementation ofClassifyRetry
Implementations§
source§impl<H, R> Operation<H, R>
impl<H, R> Operation<H, R>
sourcepub fn into_request_response(self) -> (Request, Parts<H, R>)
pub fn into_request_response(self) -> (Request, Parts<H, R>)
Converts this operation into its parts.
sourcepub fn from_parts(request: Request, parts: Parts<H, R>) -> Self
pub fn from_parts(request: Request, parts: Parts<H, R>) -> Self
sourcepub fn properties_mut(&mut self) -> impl DerefMut<Target = PropertyBag> + '_
pub fn properties_mut(&mut self) -> impl DerefMut<Target = PropertyBag> + '_
Returns a mutable reference to the request’s property bag.
sourcepub fn properties(&self) -> impl Deref<Target = PropertyBag> + '_
pub fn properties(&self) -> impl Deref<Target = PropertyBag> + '_
Returns an immutable reference to the request’s property bag.
sourcepub fn request_mut(&mut self) -> &mut Request<SdkBody>
pub fn request_mut(&mut self) -> &mut Request<SdkBody>
Gives mutable access to the underlying HTTP request.
sourcepub fn request(&self) -> &Request<SdkBody>
pub fn request(&self) -> &Request<SdkBody>
Gives readonly access to the underlying HTTP request.
sourcepub fn with_metadata(self, metadata: Metadata) -> Self
pub fn with_metadata(self, metadata: Metadata) -> Self
Attaches metadata to the operation.
sourcepub fn with_retry_classifier<R2>(self, retry_classifier: R2) -> Operation<H, R2>
pub fn with_retry_classifier<R2>(self, retry_classifier: R2) -> Operation<H, R2>
Replaces the retry classifier on the operation.
sourcepub fn retry_classifier(&self) -> &R
pub fn retry_classifier(&self) -> &R
Returns the retry classifier for this operation.
Trait Implementations§
Auto Trait Implementations§
impl<H, R> !RefUnwindSafe for Operation<H, R>
impl<H, R> Send for Operation<H, R>where H: Send, R: Send,
impl<H, R> Sync for Operation<H, R>where H: Sync, R: Sync,
impl<H, R> Unpin for Operation<H, R>where H: Unpin, R: Unpin,
impl<H, R> !UnwindSafe for Operation<H, R>
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