Trait gluon_vm::api::AsyncPushable
[−]
[src]
pub trait AsyncPushable<'vm> { fn async_push(self,
vm: &'vm Thread,
context: &mut Context)
-> Result<Async<()>>; fn status_push(self, vm: &'vm Thread, context: &mut Context) -> Status where Self: Sized { ... } }
Trait which allows a possibly asynchronous rust value to be pushed to the virtual machine
Required Methods
fn async_push(self, vm: &'vm Thread, context: &mut Context) -> Result<Async<()>>
Pushes self
to stack
. If the call is successful a single element should have been added
to the stack and Ok(())
should be returned. If the call is unsuccessful Status:Error
should be returned and the stack should be left intact.
If the value must be computed asynchronously Async::NotReady
must be returned so that
the virtual machine knows it must do more work before the value is available.