Struct message_io::events::EventReceiver[][src]

pub struct EventReceiver<E> { /* fields omitted */ }
Expand description

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.

Implementations

Returns the internal sender reference to this queue. This reference can be safety cloned and shared to other threads in order to get several senders to the same queue.

Blocks the current thread until an event is received by this queue.

Blocks the current thread until an event is received by this queue or timeout is exceeded. If timeout is reached a None is returned, otherwise the event is returned.

Attempts to receive an event without blocking. Returns Some(E) if an event was received by this queue, otherwise returns None.

Trait Implementations

Creates a new event queue for generic incoming events.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.