fd_queue/lib.rs
1// Copyright 2020 Steven Bosnick
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE-2.0 or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms
8
9//! A library for providing abstractions for passing [`RawFd`][RawFd] between
10//! processes. This is necessarily a Unix (or Unix-like) library as `RawFd` are Unix
11//! specific.
12//!
13//! The underlying mechanism for passing the `RawFd` is a Unix socket, but the
14//! different abstractions provided here are different ways of embedding this in the
15//! Rust ecosystem.
16//!
17//! [RawFd]: https://doc.rust-lang.org/stable/std/os/unix/io/type.RawFd.html
18
19#![deny(missing_docs, warnings)]
20
21mod queue;
22
23#[cfg(any(feature = "net-fd", feature = "tokio-fd"))]
24mod biqueue;
25
26#[cfg(feature = "net-fd")]
27mod net;
28
29#[cfg(feature = "mio-fd")]
30pub mod mio;
31
32#[cfg(feature = "tokio-fd")]
33pub mod tokio;
34
35#[cfg(feature = "net-fd")]
36pub use net::{Incoming, UnixListener, UnixStream};
37
38pub use queue::{DequeueFd, EnqueueFd, QueueFullError};