[−][src]Struct dyon::Module
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]
&mut self,
name: Arc<String>,
f: fn(_: &mut Runtime) -> Result<(), String>,
prelude_function: Dfn
)
Adds a new external prelude function.
pub fn add_str(
&mut self,
name: &str,
f: fn(_: &mut Runtime) -> Result<(), String>,
prelude_function: Dfn
)
[src]
&mut self,
name: &str,
f: fn(_: &mut Runtime) -> Result<(), String>,
prelude_function: Dfn
)
Adds a new external prelude function.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,