From 9fb6d6f4b2e307d81a645851af77b0886de64339 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 12 Jan 2017 04:28:34 +0000 Subject: [PATCH] impl Debug for SocketSet. --- src/socket/mod.rs | 1 + src/socket/set.rs | 1 + src/socket/udp.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/socket/mod.rs b/src/socket/mod.rs index 88503aa..0ca3c27 100644 --- a/src/socket/mod.rs +++ b/src/socket/mod.rs @@ -41,6 +41,7 @@ pub use self::set::{Iter as SocketSetIter, IterMut as SocketSetIterMut}; /// which is rather inelegant. Conversely, when `dispatch` is called, the packet length is /// not yet known and the packet storage has to be allocated; but the `&PacketRepr` is sufficient /// since the lower layers treat the packet as an opaque octet sequence. +#[derive(Debug)] pub enum Socket<'a, 'b: 'a> { Udp(UdpSocket<'a, 'b>), Tcp(TcpSocket<'a>), diff --git a/src/socket/set.rs b/src/socket/set.rs index e2843dc..4c8c43c 100644 --- a/src/socket/set.rs +++ b/src/socket/set.rs @@ -10,6 +10,7 @@ pub struct Handle { } /// An extensible set of sockets, with stable numeric identifiers. +#[derive(Debug)] pub struct Set<'a, 'b: 'a, 'c: 'a + 'b> { sockets: ManagedSlice<'a, Option>> } diff --git a/src/socket/udp.rs b/src/socket/udp.rs index 9aa3f6c..2dd266b 100644 --- a/src/socket/udp.rs +++ b/src/socket/udp.rs @@ -107,6 +107,7 @@ impl<'a, 'b> SocketBuffer<'a, 'b> { /// /// An UDP socket is bound to a specific endpoint, and owns transmit and receive /// packet buffers. +#[derive(Debug)] pub struct UdpSocket<'a, 'b: 'a> { endpoint: IpEndpoint, rx_buffer: SocketBuffer<'a, 'b>,