Trait valuable_futures::StateMachine [] [src]

pub trait StateMachine: Sized {
    type Supply;
    type Item;
    type Error;
    fn poll(
        self,
        _: &mut Self::Supply
    ) -> Result<Async<Self::Item, Self>, Self::Error>; }

A type-safe future-like trait that has also borrowed mutable state

Associated Types

A data, mutable pointer of which is supplied as the second argument of the poll() method.

The type of value that this future will resolved with if it is successful

The type of error that this future will resolve with if it fails in a normal fashion.

Required Methods

Query this future to see if its value has become available, registering interest if it is not.

The difference of this method to the futures::Future::poll is that self is passed by value and supply is passed by a mutable reference.

See documentation of futures for more more information on how the method should be implemented.

Implementors