1#[macro_use]
2extern crate enum_primitive_derive;
3extern crate num_traits;
4
5pub mod options;
6pub mod packet;
7pub mod server;
8
9#[macro_export]
11macro_rules! u32_bytes {
12    ( $x:expr ) => {
13        [
14            ($x >> 24) as u8,
15            ($x >> 16) as u8,
16            ($x >> 8) as u8,
17            $x as u8,
18        ]
19    };
20}
21
22#[macro_export]
24macro_rules! bytes_u32 {
25    ( $x:expr ) => {
26        ($x[0] as u32) * (1 << 24)
27            + ($x[1] as u32) * (1 << 16)
28            + ($x[2] as u32) * (1 << 8)
29            + ($x[3] as u32)
30    };
31}
32
33#[cfg(test)]
34mod tests {
35    #[test]
36    fn it_works() {}
37}