1#![cfg_attr(feature = "std", doc = "[`TcpListener`]: std::net::TcpListener")]
27#![cfg_attr(feature = "std", doc = "[`TcpStream`]: std::net::TcpStream")]
28#![cfg_attr(feature = "std", doc = "[`UdpSocket`]: std::net::UdpSocket")]
29#![cfg_attr(
30 not(feature = "std"),
31 doc = "[`TcpListener`]: https://doc.rust-lang.org/std/net/struct.TcpListener.html"
32)]
33#![cfg_attr(
34 not(feature = "std"),
35 doc = "[`TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html"
36)]
37#![cfg_attr(
38 not(feature = "std"),
39 doc = "[`UdpSocket`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html"
40)]
41#![no_std]
42#![deny(
43 dead_code,
44 missing_docs,
45 unused_imports,
46 unused_must_use,
47 unused_parens,
48 unused_qualifications,
49 warnings
50)]
51#![cfg_attr(all(feature = "std", feature = "unstable_ip"), feature(ip))]
52
53#[cfg(not(feature = "std"))]
54mod addr;
55#[cfg(not(feature = "std"))]
56mod helper;
57#[cfg(not(feature = "std"))]
58mod ip;
59#[cfg(not(feature = "std"))]
60mod parser;
61#[cfg(all(not(feature = "std"), test))]
62mod test;
63
64#[cfg(all(not(feature = "std"), test))]
65#[macro_use]
66extern crate alloc;
67
68#[cfg(all(not(feature = "std"), feature = "serde"))]
69extern crate serde;
70#[cfg(all(not(feature = "std"), feature = "serde"))]
71mod de;
72#[cfg(all(not(feature = "std"), feature = "serde"))]
73mod ser;
74
75#[cfg(not(feature = "std"))]
76pub use addr::{SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
77#[cfg(all(not(feature = "std"), feature = "unstable_ip"))]
78pub use ip::Ipv6MulticastScope;
79#[cfg(not(feature = "std"))]
80pub use ip::{IpAddr, Ipv4Addr, Ipv6Addr};
81
82#[cfg(feature = "std")]
84extern crate std;
85#[cfg(all(feature = "std", feature = "unstable_ip"))]
86pub use std::net::Ipv6MulticastScope;
87#[cfg(feature = "std")]
88pub use std::net::{
89 IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs,
90};