[][src]Crate actix_interop

Use async/await syntax with actix actors.

Structs

FutureInteropWrap

Future to ActorFuture adapter returned by interop_actor.

StreamInteropWrap

Stream to ActorStream adapter returned by interop_actor.

Traits

FutureInterop

Extension trait implemented for all futures. Import this trait to bring the interop_actor and interop_actor_boxed methods into scope.

StreamInterop

Extension trait implemented for all streams. Import this trait to bring the interop_actor and interop_actor_boxed methods into scope.

Functions

critical_section

May be called in the same places as with_ctx to run a chunk of async code with exclusive access to an actor's state: no other futures spawned to this actor will be polled during the critical section. Unlike with_ctx, calls to this function may be nested, although there is little point in doing so. Calling with_ctx from within a critical section is allowed (and expected).

with_ctx

May be called from within a future spawned onto an actor context to gain mutable access to the actor's state and/or context. The future must have been wrapped using interop_actor or interop_actor_boxed.