pub fn runtime(&self) -> RuntimeContext {
        RuntimeContext {
            functions: self.functions.clone(),
            types: self.types.iter().map(|(k, t)| (*k, t.type_check)).collect(),
            constants: self.constants.clone(),
        }
    }
/// Construct a runtime context used when executing the virtual machine.
///
/// ```rust
/// use runestick::{Context, Vm, Unit};
/// use std::sync::Arc;
///
/// # fn main() -> runestick::Result<()> {
/// let context = Context::with_default_modules()?;
///
/// let runtime = Arc::new(context.runtime());
/// let unit = Arc::new(Unit::default());
///
/// let vm = Vm::new(runtime, unit);
/// # Ok(()) }
/// ```
Construct a runtime context used when executing the virtual machine.
Construct a runtime context used when executing the virtual machine .
pub fn runtime(&self) -> RuntimeContext {
        RuntimeContext {
            functions: self.functions.clone(),
            types: self.types.iter().map(|(k, t)| (*k, t.type_check)).collect(),
            constants: self.constants.clone(),
        }
    }
pub fn runtime ( & self ) -> RuntimeContext { RuntimeContext { functions : self . functions . clone ( ) , types : self . types . iter ( ) . map ( | ( k , t ) | ( * k , t . type_check ) ) . collect ( ) , constants : self . constants . clone ( ) , } }
Construct a runtime context used when executing the virtual machine.
Construct a runtime context used when executing the virtual machine .
&self
&self
fn main() -> runestick::result<()> {
let context = Context::with_default_modules()?.

let runtime = Arc::new(context.runtime());
let unit = Arc::new(Unit::default()).

let vm = Vm::new(runtime, unit).
let context = Context :: with_default_modules () ? . let runtime = Arc :: new ( context . runtime () ) ; let unit = Arc :: new ( Unit :: default () ) . let vm = Vm :: new ( runtime unit ) .
ok(()) }
None