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

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

Input network events.

Variants

Message(InMessage, Endpoint)

Input message received by the network.

AddedEndpoint(EndpointSocketAddr)

New endpoint added to a listener. In TCP it will be sent when a new connection was accepted by the listener. IN UDP will be sent when the socket send data by first time, before the Message event.

RemovedEndpoint(Endpoint)

A connection lost event. This event is only dispatched when a connection is lost, remove_endpoint() not generate the event. This event will be sent only in TCP. Because UDP is not connection oriented, this event can no be detected

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.