mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
tokio: include async-traits
feature (#1314)
The `tokio` facade crate will depend on the `async-traits` feature flag in sub crates.
This commit is contained in:
parent
b14e189e44
commit
e6cf976662
@ -34,7 +34,7 @@ jobs:
|
|||||||
tokio-reactor: []
|
tokio-reactor: []
|
||||||
tokio-signal: []
|
tokio-signal: []
|
||||||
tokio-tcp:
|
tokio-tcp:
|
||||||
- incoming
|
- async-traits
|
||||||
# - tokio-tls
|
# - tokio-tls
|
||||||
tokio-udp: []
|
tokio-udp: []
|
||||||
tokio-uds:
|
tokio-uds:
|
||||||
|
@ -22,7 +22,7 @@ categories = ["asynchronous"]
|
|||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
incoming = []
|
async-traits = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-util = { git = "https://github.com/tokio-rs/async" }
|
async-util = { git = "https://github.com/tokio-rs/async" }
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
//! [incoming_method]: struct.TcpListener.html#method.incoming
|
//! [incoming_method]: struct.TcpListener.html#method.incoming
|
||||||
//! [`Incoming`]: struct.Incoming.html
|
//! [`Incoming`]: struct.Incoming.html
|
||||||
|
|
||||||
#[cfg(feature = "incoming")]
|
#[cfg(feature = "async-traits")]
|
||||||
mod incoming;
|
mod incoming;
|
||||||
mod listener;
|
mod listener;
|
||||||
pub mod split;
|
pub mod split;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#[cfg(feature = "incoming")]
|
#[cfg(feature = "async-traits")]
|
||||||
use super::incoming::Incoming;
|
use super::incoming::Incoming;
|
||||||
use super::TcpStream;
|
use super::TcpStream;
|
||||||
use futures_core::ready;
|
use futures_core::ready;
|
||||||
@ -288,7 +288,7 @@ impl TcpListener {
|
|||||||
/// });
|
/// });
|
||||||
/// # Ok::<_, Box<dyn std::error::Error>>(())
|
/// # Ok::<_, Box<dyn std::error::Error>>(())
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(feature = "incoming")]
|
#[cfg(feature = "async-traits")]
|
||||||
pub fn incoming(self) -> Incoming {
|
pub fn incoming(self) -> Incoming {
|
||||||
Incoming::new(self)
|
Incoming::new(self)
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ tokio-macros = { version = "0.2.0", optional = true, path = "../tokio-macros" }
|
|||||||
tokio-reactor = { version = "0.2.0", optional = true, path = "../tokio-reactor" }
|
tokio-reactor = { version = "0.2.0", optional = true, path = "../tokio-reactor" }
|
||||||
tokio-sync = { version = "0.2.0", optional = true, path = "../tokio-sync", features = ["async-traits"] }
|
tokio-sync = { version = "0.2.0", optional = true, path = "../tokio-sync", features = ["async-traits"] }
|
||||||
tokio-threadpool = { version = "0.2.0", optional = true, path = "../tokio-threadpool" }
|
tokio-threadpool = { version = "0.2.0", optional = true, path = "../tokio-threadpool" }
|
||||||
tokio-tcp = { version = "0.2.0", optional = true, path = "../tokio-tcp" }
|
tokio-tcp = { version = "0.2.0", optional = true, path = "../tokio-tcp", features = ["async-traits"] }
|
||||||
tokio-udp = { version = "0.2.0", optional = true, path = "../tokio-udp" }
|
tokio-udp = { version = "0.2.0", optional = true, path = "../tokio-udp" }
|
||||||
tokio-timer = { version = "0.3.0", optional = true, path = "../tokio-timer" }
|
tokio-timer = { version = "0.3.0", optional = true, path = "../tokio-timer" }
|
||||||
tracing-core = { version = "0.1", optional = true }
|
tracing-core = { version = "0.1", optional = true }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user