pub enum Socket<'a> {
Tcp(Socket<'a>),
Dhcpv4(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§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Socket<'a>
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