Crate near_async

Crate near_async 

Source

Re-exports§

pub use near_time as time;

Modules§

futures
instrumentation
messaging
multithread
test_loop
This is a framework to test async code in a way that is versatile, deterministic, easy-to-setup, and easy-to-debug.
tokio

Structs§

ActorSystem
Represents a collection of actors, so that they can be shutdown together.

Functions§

new_owned_future_spawner
Spawns a future spawner that is NOT owned by any ActorSystem. Rather, the returned FutureSpawner, when dropped, will stop the runtime.
new_owned_multithread_actor
Spawns a multithreaded actor which is NOT owned by any ActorSystem. Rather, the returned handle, when dropped, will stop the actor and its runtime.
shutdown_all_actors
Shutdown all actors, assuming at most one ActorSystem. TODO(#14005): Ideally, shutting down actors should not be done by calling a global function.

Derive Macros§

MultiSend
Derives the ability to use this struct of Senders and AsyncSenders to call .send or .send_async directly as if using one of the included Senders or AsyncSenders.
MultiSenderFrom
Derives the ability to convert an object into this struct of Sender and AsyncSenders, as long as the object can be converted into each individual Sender or AsyncSender. The conversion is done by calling .as_multi_sender() or .into_multi_sender().