impl Debug for SocketSet.

This commit is contained in:
whitequark 2017-01-12 04:28:34 +00:00
parent 4b92c25fa3
commit 9fb6d6f4b2
3 changed files with 3 additions and 0 deletions

View File

@ -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>),

View File

@ -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>>>
}

View File

@ -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>,