directive

open fun directive(function: S.() -> Any): Directive

Runs function with a newScope as its receiver and coerces its result to a Directive via directiveOf.

Throws

if function's result is neither a Directive nor a Struct.