mio 0.7.0

Lightweight non-blocking IO
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[test]
#[cfg(unix)]
#[cfg(not(debug_assertions))]
fn assert_size() {
    use mio::net::*;
    use std::mem::size_of;

    // Without debug assertions enabled `TcpListener`, `TcpStream` and `UdpSocket` should have the
    // same size as the system specific socket, i.e. just a file descriptor on Unix platforms.
    assert_eq!(size_of::<TcpListener>(), size_of::<std::net::TcpListener>());
    assert_eq!(size_of::<TcpStream>(), size_of::<std::net::TcpStream>());
    assert_eq!(size_of::<UdpSocket>(), size_of::<std::net::UdpSocket>());
}