aztec-nr - noir_aztec::macros::functions

Function initializer

pub comptime fn initializer(f: FunctionDefinition)

An initializer function is similar to a constructor:

  • it can only be called once
  • if there are multiple initializer functions, only one of them can be called
  • no non-initializer functions can be called until an initializer has ben called (except noinitcheck functions)