Browse Source

impl Debug for SocketSet.

whitequark 8 years ago
parent
commit
0dedbaf597
3 changed files with 3 additions and 0 deletions
  1. 1 0
      src/socket/mod.rs
  2. 1 0
      src/socket/set.rs
  3. 1 0
      src/socket/udp.rs

+ 1 - 0
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>),

+ 1 - 0
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<Socket<'b, 'c>>>
 }

+ 1 - 0
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>,