Skip to main content
Version: dev

Module

std::meta::module contains methods on the built-in Module type which represents a module in the source program. Note that this type represents a module generally, it isn't limited to only mod my_submodule { ... } declarations in the source program.

Methods

name

name
fn name(self) -> Quoted {}

Source code: noir_stdlib/src/meta/module.nr#L13-L15

Returns the name of the module.

functions

functions
fn functions(self) -> [FunctionDefinition] {}

Source code: noir_stdlib/src/meta/module.nr#L8-L10

Returns each function in the module.

is_contract

is_contract
fn is_contract(self) -> bool {}

Source code: noir_stdlib/src/meta/module.nr#L3-L5

true if this module is a contract module (was declared via contract foo { ... }).