Struct mun_runtime::Runtime [−][src]
A runtime for the Mun language.
Logging
The runtime uses log as a logging facade, but does not install a logger. To produce log output, you have to use a logger implementation compatible with the facade.
Implementations
impl Runtime
[src]
pub fn new(options: RuntimeOptions) -> Result<Runtime>
[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]
&self,
function_name: &str
) -> Option<&FunctionDefinition>
Retrieves the function definition corresponding to function_name
, if available.
pub fn get_type_info(&self, type_name: &str) -> Option<&TypeInfo>
[src]
Retrieves the type definition corresponding to type_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<'i, 'o, 'r, 's, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str
) -> Result<Output, InvokeErr0<'i, 's>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str
) -> Result<Output, InvokeErr0<'i, 's>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A
) -> Result<Output, InvokeErr1<'i, 's, A>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A
) -> Result<Output, InvokeErr1<'i, 's, A>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B
) -> Result<Output, InvokeErr2<'i, 's, A, B>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B
) -> Result<Output, InvokeErr2<'i, 's, A, B>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C
) -> Result<Output, InvokeErr3<'i, 's, A, B, C>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C
) -> Result<Output, InvokeErr3<'i, 's, A, B, C>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D
) -> Result<Output, InvokeErr4<'i, 's, A, B, C, D>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D
) -> Result<Output, InvokeErr4<'i, 's, A, B, C, D>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E
) -> Result<Output, InvokeErr5<'i, 's, A, B, C, D, E>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E
) -> Result<Output, InvokeErr5<'i, 's, A, B, C, D, E>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F
) -> Result<Output, InvokeErr6<'i, 's, A, B, C, D, E, F>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F
) -> Result<Output, InvokeErr6<'i, 's, A, B, C, D, E, F>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G
) -> Result<Output, InvokeErr7<'i, 's, A, B, C, D, E, F, G>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G
) -> Result<Output, InvokeErr7<'i, 's, A, B, C, D, E, F, G>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H
) -> Result<Output, InvokeErr8<'i, 's, A, B, C, D, E, F, G, H>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H
) -> Result<Output, InvokeErr8<'i, 's, A, B, C, D, E, F, G, H>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I
) -> Result<Output, InvokeErr9<'i, 's, A, B, C, D, E, F, G, H, I>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I
) -> Result<Output, InvokeErr9<'i, 's, A, B, C, D, E, F, G, H, I>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, J: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J
) -> Result<Output, InvokeErr10<'i, 's, A, B, C, D, E, F, G, H, I, J>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J
) -> Result<Output, InvokeErr10<'i, 's, A, B, C, D, E, F, G, H, I, J>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, J: ArgumentReflection + Marshal<'i>, K: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K
) -> Result<Output, InvokeErr11<'i, 's, A, B, C, D, E, F, G, H, I, J, K>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K
) -> Result<Output, InvokeErr11<'i, 's, A, B, C, D, E, F, G, H, I, J, K>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, J: ArgumentReflection + Marshal<'i>, K: ArgumentReflection + Marshal<'i>, L: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L
) -> Result<Output, InvokeErr12<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L
) -> Result<Output, InvokeErr12<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, J: ArgumentReflection + Marshal<'i>, K: ArgumentReflection + Marshal<'i>, L: ArgumentReflection + Marshal<'i>, M: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L,
arg13: M
) -> Result<Output, InvokeErr13<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L, M>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L,
arg13: M
) -> Result<Output, InvokeErr13<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L, M>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, J: ArgumentReflection + Marshal<'i>, K: ArgumentReflection + Marshal<'i>, L: ArgumentReflection + Marshal<'i>, M: ArgumentReflection + Marshal<'i>, N: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L,
arg13: M,
arg14: N
) -> Result<Output, InvokeErr14<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L, M, N>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L,
arg13: M,
arg14: N
) -> Result<Output, InvokeErr14<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L, M, N>> where
'r: 'o,
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<'i, 'o, 'r, 's, A: ArgumentReflection + Marshal<'i>, B: ArgumentReflection + Marshal<'i>, C: ArgumentReflection + Marshal<'i>, D: ArgumentReflection + Marshal<'i>, E: ArgumentReflection + Marshal<'i>, F: ArgumentReflection + Marshal<'i>, G: ArgumentReflection + Marshal<'i>, H: ArgumentReflection + Marshal<'i>, I: ArgumentReflection + Marshal<'i>, J: ArgumentReflection + Marshal<'i>, K: ArgumentReflection + Marshal<'i>, L: ArgumentReflection + Marshal<'i>, M: ArgumentReflection + Marshal<'i>, N: ArgumentReflection + Marshal<'i>, O: ArgumentReflection + Marshal<'i>, Output: 'o + ReturnTypeReflection + Marshal<'o>>(
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L,
arg13: M,
arg14: N,
arg15: O
) -> Result<Output, InvokeErr15<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>> where
'r: 'o,
[src]
runtime: &'r Runtime,
function_name: &'s str,
arg1: A,
arg2: B,
arg3: C,
arg4: D,
arg5: E,
arg6: F,
arg7: G,
arg8: H,
arg9: I,
arg10: J,
arg11: K,
arg12: L,
arg13: M,
arg14: N,
arg15: O
) -> Result<Output, InvokeErr15<'i, 's, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>> where
'r: 'o,
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]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,