pub(crate) fn run_capability_post_invoke(
    resp: InvocationResponse,
    middlewares: &[Box<dyn Middleware>],
) -> Result<InvocationResponse> {
    let mut cur_resp = resp;
    for m in middlewares {
        match m.capability_post_invoke(cur_resp) {
            Ok(ir) => cur_resp = ir.clone(),
            Err(e) => {
                error!("Capability middleware post-invoke failure: {}", e);
                return Err(e);
            }
        }
    }
    Ok(cur_resp)
}
/// Executes a chain of post-invoke handlers for a capability
Executes a chain of post-invoke handlers for a capability
Executes a chain of post - invoke handlers for a capability
pub(crate) fn run_capability_post_invoke(
    resp: InvocationResponse,
    middlewares: &[Box<dyn Middleware>],
) -> Result<InvocationResponse> {
    let mut cur_resp = resp;
    for m in middlewares {
        match m.capability_post_invoke(cur_resp) {
            Ok(ir) => cur_resp = ir.clone(),
            Err(e) => {
                error!("Capability middleware post-invoke failure: {}", e);
                return Err(e);
            }
        }
    }
    Ok(cur_resp)
}
pub ( crate ) fn run_capability_post_invoke ( resp : InvocationResponse , middlewares : & [ Box < dyn Middleware > ] , ) -> Result < InvocationResponse > { let mut cur_resp = resp ; for m in middlewares { match m . capability_post_invoke ( cur_resp ) { Ok ( ir ) => cur_resp = ir . clone ( ) , Err ( e ) => { error ! ( " " e ) ; return Err ( e ) ; } } } Ok ( cur_resp ) }
Executes a chain of post-invoke handlers for a capability
Executes a chain of post - invoke handlers for a capability
resp
InvocationResponse
middlewares
&[Box<dyn Middleware>]
resp
InvocationResponse
middlewares
&[Box<dyn Middleware>]