pub enum Socket<'a> {
Raw(Socket<'a>),
Icmp(Socket<'a>),
Udp(Socket<'a>),
Tcp(Socket<'a>),
Dhcpv4(Socket<'a>),
Dns(Socket<'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 udp::Socket
, call udp::Socket::downcast(socket)
.
It is usually more convenient to use SocketSet::get instead.
Variants§
Raw(Socket<'a>)
Icmp(Socket<'a>)
Udp(Socket<'a>)
Tcp(Socket<'a>)
Dhcpv4(Socket<'a>)
Dns(Socket<'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§
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