Struct rurust::builder::module::Module [−][src]
A module builder.
Implementations
impl Module
[src]
pub fn new<S>(name: S) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Creates a new module under the global scope.
pub 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).
pub fn constant<S>(self, name: S, value: Value) -> Self where
S: Into<String>,
[src]
S: Into<String>,
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]
self,
name: S,
func_addr: *mut extern "C" fn() -> Value,
arg_count: i8
) -> Self where
S: Into<String>,
Defines a function.
pub fn build(self) -> Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Module
[src]
impl !Send for Module
[src]
impl !Sync for Module
[src]
impl Unpin for Module
[src]
impl UnwindSafe for Module
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,