OxL Справочник OxL
РусскийEnglish

method Response.refuse

A short-circuit answer: the call fails with e and the handler does not run (if next is not called).

Example:

oxl✓ проверяется в CI
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

Параметры

ИмяТип
eNetError

Возвращает

Response

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/rpc.oxl:464

См. также