Skip to main content

decide

Function decide 

Source
pub fn decide(
    call: &Call,
    response: &ResponsePeek,
    prices: &PriceBook,
) -> Charge
Expand description

Decide what a completed request/response exchange is worth.

Ordering matters: errors are checked before anything else so a failure is never billed regardless of which method produced it, and task handling precedes the generic resultType arm because a task poll legitimately carries resultType: "complete" while delivering nothing but a progress report.