[][src]Struct message_io::events::EventQueue

pub struct EventQueue<E> { /* fields omitted */ }

Implementations

impl<E> EventQueue<E> where
    E: Send + 'static, 
[src]

pub fn new() -> EventQueue<E>[src]

Creates a new event queue for generic incoming events.

pub fn sender(&mut self) -> &mut EventSender<E>[src]

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

pub fn receive(&mut self) -> E[src]

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

pub fn receive_event_timeout(&mut self, timeout: Duration) -> Option<E>[src]

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.

Auto Trait Implementations

impl<E> !RefUnwindSafe for EventQueue<E>

impl<E> Send for EventQueue<E> where
    E: Send

impl<E> Sync for EventQueue<E> where
    E: Send

impl<E> Unpin for EventQueue<E> where
    E: Unpin

impl<E> !UnwindSafe for EventQueue<E>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.