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}")
}Вывод
true false
pub(api) static fn refuse(e: NetError) -> ResponseСложность. O(1).
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
e | NetError |
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/rpc.oxl:464