Enum message_io::network::adapter::AcceptedType[][src]

pub enum AcceptedType<'a, R> {
    Remote(SocketAddr, R),
    Data(SocketAddr&'a [u8]),
}
Expand description

Used as a parameter callback in Local::accept()

Variants

Remote(SocketAddr, R)

The listener has accepted a remote (R) with the specified addr. The remote will be registered in order to generate read events. (calls to Remote::receive()). A crate::network::NetEvent::Accepted will be generated once this remote resource is considered ready.

Tuple Fields of Remote

0: SocketAddr1: R

The listener has accepted data that can be packed into a message from a specified addr. Despite of Remote, accept as a Data will not register any Remote. This will produce a crate::network::NetEvent::Message event. The endpoint of this event will be unique containing the specified addr and the listener whom generates it.

Tuple Fields of Data

0: SocketAddr1: &'a [u8]

Trait Implementations

Formats the value using the given formatter. Read more

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

Converts the given value to a String. Read more

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.