[−][src]Enum smoltcp::socket::Socket
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
Raw(RawSocket<'a, 'b>)
Icmp(IcmpSocket<'a, 'b>)
Udp(UdpSocket<'a, 'b>)
Tcp(TcpSocket<'a>)
Methods
impl<'a, 'b> Socket<'a, 'b>
[src]
pub fn handle(&self) -> SocketHandle
[src]
Return the socket handle.
Trait Implementations
impl<'a, 'b: 'a> Debug for Socket<'a, 'b>
[src]
impl<'a> Into<Socket<'a, 'a>> for TcpSocket<'a>
[src]
impl<'a, 'b> Into<Socket<'a, 'b>> for RawSocket<'a, 'b>
[src]
impl<'a, 'b> Into<Socket<'a, 'b>> for IcmpSocket<'a, 'b>
[src]
impl<'a, 'b> Into<Socket<'a, 'b>> for UdpSocket<'a, 'b>
[src]
Auto Trait Implementations
impl<'a, 'b> RefUnwindSafe for Socket<'a, 'b>
impl<'a, 'b> Send for Socket<'a, 'b>
impl<'a, 'b> Sync for Socket<'a, 'b>
impl<'a, 'b> Unpin for Socket<'a, 'b>
impl<'a, 'b> !UnwindSafe for Socket<'a, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,