[][src]Struct mun_runtime::Runtime

pub struct Runtime { /* fields omitted */ }

A runtime for the Mun language.

Implementations

impl Runtime[src]

pub fn new(options: RuntimeOptions) -> Result<Runtime, Error>[src]

Constructs a new Runtime that loads the library at library_path and its dependencies. The Runtime contains a file watcher that is triggered with an interval of dur.

pub fn get_function_definition(
    &self,
    function_name: &str
) -> Option<&FunctionDefinition>
[src]

Retrieves the function definition corresponding to function_name, if available.

pub fn update(&mut self) -> bool[src]

Updates the state of the runtime. This includes checking for file changes, and reloading compiled assemblies.

pub fn gc(&self) -> &dyn GcRuntime<UnsafeTypeInfo>[src]

Returns a shared reference to the runtime's garbage collector.

We cannot return an Arc here, because the lifetime of data contained in GarbageCollector is dependent on the Runtime.

pub fn gc_collect(&self) -> bool[src]

Collects all memory that is no longer referenced by rooted objects. Returns true if memory was reclaimed, false otherwise. This behavior will likely change in the future.

pub fn gc_stats(&self) -> Stats[src]

Returns statistics about the garbage collector.

impl Runtime[src]

pub fn invoke_fn0<'s, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str
) -> Result<Output, InvokeErr0<'s, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn1<'s, A: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A
) -> Result<Output, InvokeErr1<'s, A, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn2<'s, A: ArgumentReflection, B: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B
) -> Result<Output, InvokeErr2<'s, A, B, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn3<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C
) -> Result<Output, InvokeErr3<'s, A, B, C, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn4<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D
) -> Result<Output, InvokeErr4<'s, A, B, C, D, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn5<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E
) -> Result<Output, InvokeErr5<'s, A, B, C, D, E, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn6<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F
) -> Result<Output, InvokeErr6<'s, A, B, C, D, E, F, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn7<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G
) -> Result<Output, InvokeErr7<'s, A, B, C, D, E, F, G, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn8<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H
) -> Result<Output, InvokeErr8<'s, A, B, C, D, E, F, G, H, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn9<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I
) -> Result<Output, InvokeErr9<'s, A, B, C, D, E, F, G, H, I, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn10<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, J: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I,
    j: J
) -> Result<Output, InvokeErr10<'s, A, B, C, D, E, F, G, H, I, J, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn11<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, J: ArgumentReflection, K: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I,
    j: J,
    k: K
) -> Result<Output, InvokeErr11<'s, A, B, C, D, E, F, G, H, I, J, K, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn12<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, J: ArgumentReflection, K: ArgumentReflection, L: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I,
    j: J,
    k: K,
    l: L
) -> Result<Output, InvokeErr12<'s, A, B, C, D, E, F, G, H, I, J, K, L, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn13<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, J: ArgumentReflection, K: ArgumentReflection, L: ArgumentReflection, M: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I,
    j: J,
    k: K,
    l: L,
    m: M
) -> Result<Output, InvokeErr13<'s, A, B, C, D, E, F, G, H, I, J, K, L, M, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn14<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, J: ArgumentReflection, K: ArgumentReflection, L: ArgumentReflection, M: ArgumentReflection, N: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I,
    j: J,
    k: K,
    l: L,
    m: M,
    n: N
) -> Result<Output, InvokeErr14<'s, A, B, C, D, E, F, G, H, I, J, K, L, M, N, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

impl Runtime[src]

pub fn invoke_fn15<'s, A: ArgumentReflection, B: ArgumentReflection, C: ArgumentReflection, D: ArgumentReflection, E: ArgumentReflection, F: ArgumentReflection, G: ArgumentReflection, H: ArgumentReflection, I: ArgumentReflection, J: ArgumentReflection, K: ArgumentReflection, L: ArgumentReflection, M: ArgumentReflection, N: ArgumentReflection, O: ArgumentReflection, Output: ReturnTypeReflection>(
    runtime: &Rc<RefCell<Runtime>>,
    function_name: &'s str,
    a: A,
    b: B,
    c: C,
    d: D,
    e: E,
    f: F,
    g: G,
    h: H,
    i: I,
    j: J,
    k: K,
    l: L,
    m: M,
    n: N,
    o: O
) -> Result<Output, InvokeErr15<'s, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Output>>
[src]

Invokes the method method_name with arguments args, in the library compiled based on the manifest at manifest_path.

If an error occurs when invoking the method, an error message is logged. The runtime continues looping until the cause of the error has been resolved.

Auto Trait Implementations

impl !RefUnwindSafe for Runtime

impl Send for Runtime

impl !Sync for Runtime

impl Unpin for Runtime

impl !UnwindSafe for Runtime

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,