Struct rurust::builder::module::Module
[−]
[src]
pub struct Module { /* fields omitted */ }
A module builder.
Methods
impl Module
[src]
fn new<S>(name: S) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Creates a new module under the global scope.
fn new_under<S>(name: S, parent: Option<Value>) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Creates a new module under a value (module, class, etc).
fn constant<S>(self, name: S, value: Value) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Adds a constant to the module.
fn include(self, module: Value) -> Self
[src]
Includes a module.
fn prepend(self, module: Value) -> Self
[src]
Prepends a module.
fn function<S>(
self,
name: S,
func_addr: *mut extern "C" fn() -> Value,
arg_count: i8
) -> Self where
S: Into<String>,
[src]
self,
name: S,
func_addr: *mut extern "C" fn() -> Value,
arg_count: i8
) -> Self where
S: Into<String>,
Defines a function.