fn fail<R>(ctx: &RpcContext, sink: UnarySink<R>, rsc: RpcStatusCode, details: String) {
    debug_assert_ne!(
        rsc,
        RpcStatusCode::OK,
        "the input RpcStatusCode should not be OK"
    );
    let rs = RpcStatus::with_message(rsc, details);
    let f = sink
        .fail(rs)
        .map_err(|e| error!("failed to send response, the error is: {:?}", e))
        .map(|_| ());
    ctx.spawn(f);
}
/// Send failure `gRPC` response
Send failure `gRPC` response
Send failure ` gRPC ` response
fn fail<R>(ctx: &RpcContext, sink: UnarySink<R>, rsc: RpcStatusCode, details: String) {
    debug_assert_ne!(
        rsc,
        RpcStatusCode::OK,
        "the input RpcStatusCode should not be OK"
    );
    let rs = RpcStatus::with_message(rsc, details);
    let f = sink
        .fail(rs)
        .map_err(|e| error!("failed to send response, the error is: {:?}", e))
        .map(|_| ());
    ctx.spawn(f);
}
fn fail < R > ( ctx : & RpcContext , sink : UnarySink < R > , rsc : RpcStatusCode , details : String ) { debug_assert_ne ! ( rsc RpcStatusCode OK " " ) ; let rs = RpcStatus :: with_message ( rsc , details ) ; let f = sink . fail ( rs ) . map_err ( | e | error ! ( " " e ) ) . map ( | _ | ( ) ) ; ctx . spawn ( f ) ; }
Send failure `gRPC` response
Send failure ` gRPC ` response
ctx
&RpcContext
sink
UnarySink<R>
rsc
RpcStatusCode
details
String