Expand description
Stakker interface to Rust async/await
Stakker has two primitives for asynchronous callbacks, i.e. for passing data from one point to another:
-
stakker::Retaccepts a single value to pass to an end-point, and is consumed when used to guarantee that it is not used again -
stakker::Fwdaccepts 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§
- Actor
Fail - Error representing failure of an actor
Functions§
- current_
task - Get a reference to the current task
- future_
pull - Create a pull-style
Ret→Futurepipe, that drops the task on failure - future_
pull_ result - Create a pull-style
Ret→Futurepipe, that passes through failure - fwd_
to_ stream - Create a
Fwd→Streampipe which drops the task on failure - fwd_
to_ stream_ result - Create a
Fwd→Streampipe which passes through failure - ret_
to_ future - Create a push-style
Ret→Futurepipe, that drops the task on failure - ret_
to_ future_ result - Create a push-style
Ret→Futurepipe, that passes through failure - spawn_
future - Spawn a
Futureand pass the final result to the givenRet - spawn_
future_ with_ waker - Spawn a
Futureand pass the final result to the givenRet, withWakersupport - spawn_
stream - Spawn a
Stream, forwarding values to aFwd - spawn_
stream_ with_ waker - Spawn a
Stream, forwarding values to aFwd, withWakersupport.