pub enum Socket<'a> {
Tcp(TcpSocket<'a>),
}Expand description
A network socket.
This enumeration abstracts the various types of sockets based on the IP protocol.
To downcast a Socket value to a concrete socket, use the AnySocket trait,
e.g. to get UdpSocket, call UdpSocket::downcast(socket).
It is usually more convenient to use SocketSet::get instead.
Variants
Tcp(TcpSocket<'a>)
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Socket<'a>
impl<'a> Send for Socket<'a>
impl<'a> Sync for Socket<'a>
impl<'a> Unpin for Socket<'a>
impl<'a> !UnwindSafe for Socket<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more