/// Wait for the given awaited into the specified virtual machine.
Wait for the given awaited into the specified virtual machine.
Wait for the given awaited into the specified virtual machine .
pub(crate) async fn into_vm(self, vm: &mut Vm) -> Result<(), VmError> {
        match self {
            Self::Future(future) => {
                let value = future.borrow_mut()?.await?;
                vm.stack_mut().push(value);
                vm.advance();
            }
            Self::Select(select) => {
                let (branch, value) = select.await?;
                vm.stack_mut().push(value);
                vm.stack_mut().push(ToValue::to_value(branch)?);
                vm.advance();
            }
        }
        Ok(())
    }
pub ( crate ) async fn into_vm ( self , vm : & mut Vm ) -> Result < ( ) , VmError > { match self { Self :: Future ( future ) => { let value = future . borrow_mut ( ) ? . await ? ; vm . stack_mut ( ) . push ( value ) ; vm . advance ( ) ; } Self :: Select ( select ) => { let ( branch , value ) = select . await ? ; vm . stack_mut ( ) . push ( value ) ; vm . stack_mut ( ) . push ( ToValue :: to_value ( branch ) ? ) ; vm . advance ( ) ; } } Ok ( ( ) ) }
Wait for the given awaited into the specified virtual machine.
Wait for the given awaited into the specified virtual machine .
self
vm
&mut Vm