pub trait ContextExt: Context + Clone + Debug + Send + Sync + 'static {
    // Provided method
    fn intercept_operation(
        &self,
        service: impl Into<String>,
        operation: impl Into<String>
    ) -> impl Intercept + 'static { ... }
}
Expand description

Extension of [Context].

This trait is automatically implemented for any [Context] that satisfies the bounds.

Provided Methods§

source

fn intercept_operation( &self, service: impl Into<String>, operation: impl Into<String> ) -> impl Intercept + 'static

Creates an Intercept for the AWS service request.

A returned Intercept implements the following hooks:

  1. read_before_attempt: Starts a subsegment of the AWS service request
  2. modify_before_transmit: Injects the X-Amzn-Trace-Id header into the request
  3. read_after_attempt: Updates the subsegment with the request ID and the response status, and reports the subsegment to the X-Ray daemon

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> ContextExt for T
where T: Context + Clone + Debug + Send + Sync + 'static,