operator()
mach::Next::operator()
Invokes the next middleware.
Description
Section titled “Description”Invokes the next middleware in the request pipeline.
Syntax
Section titled “Syntax”void operator()();Exceptions
Section titled “Exceptions”| Exception | Condition |
|---|---|
std::logic_error |
Thrown if next() has already been invoked. |
Remarks
Section titled “Remarks”A Next instance may only be invoked once.
Thread Safety
Section titled “Thread Safety”This method is not thread-safe and should only be called while processing the current request.
Example
Section titled “Example”void middleware(mach::Context& context, mach::Next& next) { next();}