Closed
Description
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())
Metadata
Metadata
Assignees
Labels
No labels