[][src]Struct dyon::Module

pub struct Module { /* fields omitted */ }

Stores functions for a Dyon module.

Methods

impl Module[src]

pub fn new() -> Module[src]

Creates a new module with standard library.

pub fn new_intrinsics(intrinsics: Arc<HashMap<Arc<String>, usize>>) -> Module[src]

Creates a new module with custom intrinsics.

pub fn ns(&mut self, ns: &str)[src]

Sets namespace for following added functions.

pub fn no_ns(&mut self)[src]

Sets no namespace.

pub fn find_function(&self, name: &Arc<String>, relative: usize) -> FnIndex[src]

Find function relative another function index.

pub fn add(
    &mut self,
    name: Arc<String>,
    f: fn(_: &mut Runtime) -> Result<(), String>,
    prelude_function: Dfn
)
[src]

Adds a new external prelude function.

pub fn add_str(
    &mut self,
    name: &str,
    f: fn(_: &mut Runtime) -> Result<(), String>,
    prelude_function: Dfn
)
[src]

Adds a new external prelude function.

Trait Implementations

impl Default for Module[src]

impl Clone for Module[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Module

impl Sync for Module

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.