Struct rurust::builder::module::Module[][src]

pub struct Module { /* fields omitted */ }

A module builder.

Implementations

impl Module[src]

pub fn new<S>(name: S) -> Self where
    S: Into<String>, 
[src]

Creates a new module under the global scope.

pub fn new_under<S>(name: S, parent: Option<Value>) -> Self where
    S: Into<String>, 
[src]

Creates a new module under a value (module, class, etc).

pub fn constant<S>(self, name: S, value: Value) -> Self where
    S: Into<String>, 
[src]

Adds a constant to the module.

pub fn include(self, module: Value) -> Self[src]

Includes a module.

pub fn prepend(self, module: Value) -> Self[src]

Prepends a module.

pub fn function<S>(
    self,
    name: S,
    func_addr: *mut extern "C" fn() -> Value,
    arg_count: i8
) -> Self where
    S: Into<String>, 
[src]

Defines a function.

pub fn build(self) -> Value[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.