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

type Next

The rest of the chain: the next middleware and finally the handler. Run it with the context you hold (next(ctx)).

Example:

oxl✓ проверяется в CI
attr Logged {}

impl Middleware for Logged {
  fn around(ctx: &var Ctx, next: Next) -> Response net, io, time, db {
    print("before")
    let r = next(ctx)
    print("after")
    r
  }
}
pub(api) type Next = fn(&var Ctx) -> Response net

С версии. 1.0.0-beta

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

См. также