doc feature flags in futures
This commit is contained in:
parent
5198f8e3e4
commit
070e8e70e4
|
@ -3,6 +3,7 @@ use crate::Executor;
|
|||
use futures::Future;
|
||||
|
||||
/// An `async-std` runtime.
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "async-std")))]
|
||||
#[derive(Debug)]
|
||||
pub struct AsyncStd;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ use crate::Executor;
|
|||
use futures::Future;
|
||||
|
||||
/// A thread pool runtime for futures.
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "thread-pool")))]
|
||||
pub type ThreadPool = futures::executor::ThreadPool;
|
||||
|
||||
impl Executor for futures::executor::ThreadPool {
|
||||
|
|
|
@ -3,6 +3,7 @@ use crate::Executor;
|
|||
use futures::Future;
|
||||
|
||||
/// A `tokio` runtime.
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "tokio")))]
|
||||
pub type Tokio = tokio::runtime::Runtime;
|
||||
|
||||
impl Executor for Tokio {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#![deny(unused_results)]
|
||||
#![forbid(unsafe_code)]
|
||||
#![forbid(rust_2018_idioms)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
pub use futures;
|
||||
|
||||
mod command;
|
||||
|
|
Loading…
Reference in New Issue