pub fn vm_with_source(
    context: &runestick::Context,
    source: &str,
) -> Result<runestick::Vm, RunError> {
    let mut sources = Sources::new();
    sources.insert(Source::new("main", source.to_owned()));

    vm(context, &mut sources)
}
/// Construct a virtual machine for the given source.
Construct a virtual machine for the given source.
Construct a virtual machine for the given source .
pub fn vm_with_source(
    context: &runestick::Context,
    source: &str,
) -> Result<runestick::Vm, RunError> {
    let mut sources = Sources::new();
    sources.insert(Source::new("main", source.to_owned()));
    vm(context, &mut sources)
}
pub fn vm_with_source ( context : & runestick :: Context , source : & str , ) -> Result < runestick :: Vm , RunError > { let mut sources = Sources :: new ( ) ; sources . insert ( Source :: new ( " " , source . to_owned ( ) ) ) ; vm ( context , & mut sources ) }
Construct a virtual machine for the given source.
Construct a virtual machine for the given source .
context
&runestick::Context
source
&str
context
&runestick::Context
source
&str