[][src]Enum message_io::network::NetEvent

pub enum NetEvent<InMessage> where
    InMessage: for<'b> Deserialize<'b> + Send + 'static, 
{ Message(Endpoint, InMessage), AddedEndpoint(Endpoint), RemovedEndpoint(Endpoint), DeserializationError(Endpoint), }

Input network events.

Variants

Message(Endpoint, InMessage)

Input message received by the network.

AddedEndpoint(Endpoint)

New endpoint added to a listener. It is sent when a new connection is accepted by the listener. This event will be sent only in connection oriented protocols as TCP.

RemovedEndpoint(Endpoint)

A connection lost event. This event is only dispatched when a connection is lost. Call to remove_resource() will not generate the event. After this event, the resource is considered removed. A Message event will never be generated after this event. This event will be sent only in TCP. Because UDP is not connection oriented, the event can no be detected.

DeserializationError(Endpoint)

This event shows that there was a problem during the deserialization of a message. The problem is mainly due by a programming issue reading data from an outdated endpoint. For example: different protocol version. In production it could be that other application is writing in your application port. This error means that a message has been lost (the erroneous message), but the endpoint remains connected for its usage.

Trait Implementations

impl<InMessage: Debug> Debug for NetEvent<InMessage> where
    InMessage: for<'b> Deserialize<'b> + Send + 'static, 
[src]

Auto Trait Implementations

impl<InMessage> RefUnwindSafe for NetEvent<InMessage> where
    InMessage: RefUnwindSafe

impl<InMessage> Send for NetEvent<InMessage>

impl<InMessage> Sync for NetEvent<InMessage> where
    InMessage: Sync

impl<InMessage> Unpin for NetEvent<InMessage> where
    InMessage: Unpin

impl<InMessage> UnwindSafe for NetEvent<InMessage> where
    InMessage: UnwindSafe

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.