Enum message_io::network::adapter::AcceptedType
source · 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.
Data(SocketAddr, &'a [u8])
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.
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> RefUnwindSafe for AcceptedType<'a, R>where R: RefUnwindSafe,
impl<'a, R> Send for AcceptedType<'a, R>where R: Send,
impl<'a, R> Sync for AcceptedType<'a, R>where R: Sync,
impl<'a, R> Unpin for AcceptedType<'a, R>where R: Unpin,
impl<'a, R> UnwindSafe for AcceptedType<'a, R>where R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more