/// Encode the push itno an execution.
Encode the push itno an execution.
Encode the push itno an execution .
pub(crate) fn into_execution(self, execution: &mut VmExecution) -> Result<(), VmError> {
        let value = match self.call {
            Call::Async => Value::from(Future::new(self.vm.async_complete())),
            Call::Stream => Value::from(Stream::new(self.vm)),
            Call::Generator => Value::from(Generator::new(self.vm)),
            Call::Immediate => {
                execution.push_vm(self.vm);
                return Ok(());
            }
        };
        let vm = execution.vm_mut()?;
        vm.stack_mut().push(value);
        vm.advance();
        Ok(())
    }
pub ( crate ) fn into_execution ( self , execution : & mut VmExecution ) -> Result < ( ) , VmError > { let value = match self . call { Call :: Async => Value :: from ( Future :: new ( self . vm . async_complete ( ) ) ) , Call :: Stream => Value :: from ( Stream :: new ( self . vm ) ) , Call :: Generator => Value :: from ( Generator :: new ( self . vm ) ) , Call :: Immediate => { execution . push_vm ( self . vm ) ; return Ok ( ( ) ) ; } } ; let vm = execution . vm_mut ( ) ? ; vm . stack_mut ( ) . push ( value ) ; vm . advance ( ) ; Ok ( ( ) ) }
Encode the push itno an execution.
Encode the push itno an execution .
self
execution
&mut VmExecution