Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples for the interceptor documentation do not compile #1212

Open
MathieuDuponchelle opened this issue Nov 8, 2024 · 2 comments
Open
Labels
documentation This is a problem with documentation p2 This is a standard priority issue

Comments

@MathieuDuponchelle
Copy link

Describe the issue

I am trying to make use of the interceptor API.

The example in the documentation @ https://docs.rs/aws-sdk-transcribestreaming/latest/aws_sdk_transcribestreaming/config/struct.Builder.html#method.interceptor does not compile.

Once I do get it to compile, I'm also only getting my read_before_deserialization() implementation called once:

  #[derive(Debug)] 
  struct MyInterceptor {                                                                                                       
  }       
                                                                                                                               
  impl Intercept for MyInterceptor {                                                                                           
      fn name(&self) -> &'static str {                                                                                         
          "transcriber-stream"                                                                                                 
      }                                                                                                                        
  
      fn read_before_deserialization(&self,                                                                                    
          _context: &BeforeDeserializationInterceptorContextRef<'_>,                                                           
          _runtime_components: &RuntimeComponents, _cfg: &mut ConfigBag,) -> Result<(), Box<dyn core::error::Error + Send + Sync>> {      
          eprintln!("Here");
       
          Ok(())
      }
  } 

// ...

              let my_interceptor = MyInterceptor {};
              let builder = aws_transcribe::config::Builder::from(aws_config)
                  .interceptor(my_interceptor);
              aws_transcribe::Client::from_conf(builder.build())

Links

https://docs.rs/aws-sdk-transcribestreaming/latest/aws_sdk_transcribestreaming/config/struct.Builder.html#method.interceptor

@MathieuDuponchelle MathieuDuponchelle added documentation This is a problem with documentation needs-triage This issue or PR still needs to be triaged. labels Nov 8, 2024
@Velfi Velfi removed the needs-triage This issue or PR still needs to be triaged. label Nov 11, 2024
@Velfi
Copy link
Contributor

Velfi commented Nov 11, 2024

Thanks for reporting this. I'll let the example writer know.

@jmklix jmklix added the p2 This is a standard priority issue label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants