Module events

Source
Expand description

A set of utilities to deal with asynchronous events. This module offers a synchronized event queue and timed events.

Structs§

EventReceiver
A generic and synchronized queue where the user can send and receive events. See EventSender to see how send events. This entity can be used as an utility for the crate::network module redirecting the network events to process them later from here.
EventSender
Struct used to send events into a EventReceiver. This type can only be generated by the receiver EventReceiver.
TimerId
An ID that represents a timer scheduled. It can be used to cancel the event.

Functions§

split
As a shortcut, it returns the sender and receiver queue as a tuple.