method Response.refuse
A short-circuit answer: the call fails with e and the handler does not run (if next is not called).
Example:
fn main() io {
let r = Response.refuse(AccessDenied{})
print("{r.failed()} {r.passed}")
}Output
true false
pub(api) static fn refuse(e: NetError) -> ResponseComplexity. O(1).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
e | NetError |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/rpc.oxl:464