[][src]Enum amethyst_network::NetEvent

pub enum NetEvent<T> {
    Connected(SocketAddr),
    Disconnected(SocketAddr),
    Packet(NetPacket<T>),
    // some variants omitted
}

Network events which you can send or and receive from an endpoint.

Variants

Connected(SocketAddr)

Will be fired when a client connected. When this event occurs the NetConnection with this address was already automatically added to the world.

Disconnected(SocketAddr)

Will be fired when a client was disconnected. If this happens consider removing the NetConnection with this address from the world.

Packet(NetPacket<T>)

Send a packet to all connected clients

Trait Implementations

impl<T: Clone> Clone for NetEvent<T>[src]

impl<T: PartialEq> PartialEq<NetEvent<T>> for NetEvent<T>[src]

impl<T: Debug> Debug for NetEvent<T>[src]

impl<T> Serialize for NetEvent<T> where
    T: Serialize
[src]

impl<'de, T> Deserialize<'de> for NetEvent<T> where
    T: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<T> Send for NetEvent<T> where
    T: Send

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

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

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

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

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Any for T where
    T: Any

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]