Crate stakker_async_await[−][src]
Stakker interface to Rust async/await
Stakker has two primitives for asynchronous callbacks, i.e. for passing data from one point to another:
-
stakker::Ret
accepts a single value to pass to an end-point, and is consumed when used to guarantee that it is not used again -
stakker::Fwd
accepts an endless stream of values to pass to an end-point, and can be cloned
An end-point would typically be a method on an actor, and the value would be passed in a call to that method. However other types of end-point are possible.
The Rust standard library Future
is like a Ret
in reverse. A
Ret
sends the response to an end-point, but a Future
is held
by the end-point to receive the response.
Structs
ActorFail | Error representing failure of an actor |
Functions
current_task | Get a reference to the current task |
future_pull | Create a pull-style |
future_pull_result | Create a pull-style |
fwd_to_stream | Create a |
fwd_to_stream_result | Create a |
ret_to_future | Create a push-style |
ret_to_future_result | Create a push-style |
spawn_future | Spawn a |
spawn_future_with_waker | Spawn a |
spawn_stream | Spawn a |
spawn_stream_with_waker | Spawn a |