Struct gluon_vm::api::FutureResult
[−]
[src]
pub struct FutureResult<F>(pub F);
Wrapper around a Future
which can be used as a return value to let the virtual machine know
that it must resolve the Future
to receive the value.
Trait Implementations
impl<F> VmType for FutureResult<F> where F: Future, F::Item: VmType
[src]
type Type = F::Item::Type
A version of Self
which implements Any
allowing a TypeId
to be retrieved
fn make_type(vm: &Thread) -> ArcType
Creates an gluon type which maps to Self
in rust
fn extra_args() -> VmIndex
How many extra arguments a function returning this type requires. Used for abstract types which when used in return position should act like they still need more arguments before they are called Read more
impl<'vm, F> AsyncPushable<'vm> for FutureResult<F> where F: Future<Error=Error> + Send + 'static,
F::Item: Pushable<'vm>
[src]
F::Item: Pushable<'vm>
fn async_push(self, _: &'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. Read more