Crate async_object
source · [−]Expand description
Async Object
This crate provides reference-counting wrappers and support for event publishing/subscription for using objects in multithread asynchronous environment.
The main purpose of the library is to provide foundation for my experimental GUI library WAG, but it’s abstract enough to be used anywhere else.
The library primitives (CArc, EArc, etc) ususally are not supposed to be used directly. Macros for generation the wrapper structures should be employed instead.
See documentation for async_object_derive library for usage sample
Structs
Reference-counting pointer based on Arc<RwLock
Reference-counting object based on Arc<RwLock<…>> with methods for broadcasting events
Container for event. The main purpose of this container is to ensure correct order of events. Asyncronous send_event function finishes only when all copies of Event are destroyed. This allows to guarantee that sent event was processed by all handlers at the moment when send_event returned
Asychronous stream of events of specified type generated by EArc object. The stream’s next() method returns Some(Event
Non-owning variant of [‘CArc’]
Non-owning reference to EArc