use cfg_if::cfg_if;
pub use datagram::UnixDatagram;
pub use listener::{Incoming, UnixListener};
pub use stream::UnixStream;
mod datagram;
mod listener;
mod stream;
cfg_if! {
if #[cfg(feature = "docs")] {
use std::fmt;
use std::path::Path;
#[derive(Clone)]
pub struct SocketAddr {
_private: (),
}
impl SocketAddr {
pub fn is_unnamed(&self) -> bool {
unreachable!()
}
pub fn as_pathname(&self) -> Option<&Path> {
unreachable!()
}
}
impl fmt::Debug for SocketAddr {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
unreachable!()
}
}
} else {
#[doc(inline)]
pub use std::os::unix::net::SocketAddr;
}
}