Rename feature docs.rs to docs

pull/10/head
Stjepan Glavina 5 years ago
parent 756da0e89d
commit 9d8ac36813

@ -12,11 +12,11 @@ keywords = []
categories = ["asynchronous", "concurrency"] categories = ["asynchronous", "concurrency"]
[package.metadata.docs.rs] [package.metadata.docs.rs]
features = ["docs.rs"] features = ["docs"]
rustdoc-args = ["--features docs.rs"] rustdoc-args = ["--features docs"]
[features] [features]
"docs.rs" = [] docs = []
[dependencies] [dependencies]
async-task = { path = "async-task" } async-task = { path = "async-task" }

@ -25,7 +25,7 @@ git clone git@github.com:stjepang/async-std.git && cd async-std
Read the docs: Read the docs:
``` ```
cargo doc --features docs.rs --open cargo doc --features docs --open
``` ```
Check out the [examples](examples). To run an example: Check out the [examples](examples). To run an example:

@ -102,16 +102,16 @@ impl DirBuilder {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::fs::DirBuilderExt; use crate::os::unix::fs::DirBuilderExt;
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
use std::os::unix::fs::DirBuilderExt; use std::os::unix::fs::DirBuilderExt;
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl DirBuilderExt for DirBuilder { impl DirBuilderExt for DirBuilder {
fn mode(&mut self, mode: u32) -> &mut Self { fn mode(&mut self, mode: u32) -> &mut Self {
self.mode = Some(mode); self.mode = Some(mode);

@ -228,16 +228,16 @@ fn io_error(err: impl Into<Box<dyn std::error::Error + Send + Sync>>) -> io::Err
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::fs::DirEntryExt; use crate::os::unix::fs::DirEntryExt;
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
use std::os::unix::fs::DirEntryExt; use std::os::unix::fs::DirEntryExt;
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl DirEntryExt for DirEntry { impl DirEntryExt for DirEntry {
fn ino(&self) -> u64 { fn ino(&self) -> u64 {
self.ino self.ino

@ -772,7 +772,7 @@ impl From<std::fs::File> for File {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -782,9 +782,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for File { impl AsRawFd for File {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
self.raw_fd self.raw_fd
@ -805,9 +805,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] #[cfg_attr(feature = "docs", doc(cfg(windows)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
impl AsRawHandle for File { impl AsRawHandle for File {
fn as_raw_handle(&self) -> RawHandle { fn as_raw_handle(&self) -> RawHandle {
self.raw_handle.0 self.raw_handle.0

@ -333,16 +333,16 @@ impl OpenOptions {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::fs::OpenOptionsExt; use crate::os::unix::fs::OpenOptionsExt;
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
use std::os::unix::fs::OpenOptionsExt; use std::os::unix::fs::OpenOptionsExt;
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl OpenOptionsExt for OpenOptions { impl OpenOptionsExt for OpenOptions {
fn mode(&mut self, mode: u32) -> &mut Self { fn mode(&mut self, mode: u32) -> &mut Self {
self.0.mode(mode); self.0.mode(mode);

@ -10,7 +10,7 @@ use crate::future::Future;
use crate::task::{Context, Poll}; use crate::task::{Context, Poll};
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
#[doc(hidden)] #[doc(hidden)]
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
@ -33,7 +33,7 @@ cfg_if! {
/// ///
/// [`std::io::BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html /// [`std::io::BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
/// [`futures::io::AsyncBufRead`]: /// [`futures::io::AsyncBufRead`]:
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html /// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html
pub trait BufRead { pub trait BufRead {
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached. /// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
/// ///

@ -11,7 +11,7 @@ use crate::io;
use crate::task::{Context, Poll}; use crate::task::{Context, Poll};
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
#[doc(hidden)] #[doc(hidden)]
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
@ -34,7 +34,7 @@ cfg_if! {
/// ///
/// [`std::io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html /// [`std::io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
/// [`futures::io::AsyncRead`]: /// [`futures::io::AsyncRead`]:
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html /// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html
pub trait Read { pub trait Read {
/// Reads some bytes from the byte stream. /// Reads some bytes from the byte stream.
/// ///

@ -9,7 +9,7 @@ use crate::io;
use crate::task::{Context, Poll}; use crate::task::{Context, Poll};
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
#[doc(hidden)] #[doc(hidden)]
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
@ -32,7 +32,7 @@ cfg_if! {
/// ///
/// [`std::io::Seek`]: https://doc.rust-lang.org/std/io/trait.Seek.html /// [`std::io::Seek`]: https://doc.rust-lang.org/std/io/trait.Seek.html
/// [`futures::io::AsyncSeek`]: /// [`futures::io::AsyncSeek`]:
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html /// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html
pub trait Seek { pub trait Seek {
/// Seeks to a new position in a byte stream. /// Seeks to a new position in a byte stream.
/// ///

@ -163,7 +163,7 @@ impl futures::io::AsyncWrite for Stderr {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, RawFd};
use crate::os::windows::io::{AsRawHandle, RawHandle}; use crate::os::windows::io::{AsRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -173,9 +173,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for Stderr { impl AsRawFd for Stderr {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
io::stderr().as_raw_fd() io::stderr().as_raw_fd()
@ -184,9 +184,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
impl AsRawHandle for Stderr { impl AsRawHandle for Stderr {
fn as_raw_handle(&self) -> RawHandle { fn as_raw_handle(&self) -> RawHandle {
io::stderr().as_raw_handle() io::stderr().as_raw_handle()

@ -195,7 +195,7 @@ impl futures::io::AsyncRead for Stdin {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, RawFd};
use crate::os::windows::io::{AsRawHandle, RawHandle}; use crate::os::windows::io::{AsRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -205,9 +205,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for Stdin { impl AsRawFd for Stdin {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
io::stdin().as_raw_fd() io::stdin().as_raw_fd()
@ -216,9 +216,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
impl AsRawHandle for Stdin { impl AsRawHandle for Stdin {
fn as_raw_handle(&self) -> RawHandle { fn as_raw_handle(&self) -> RawHandle {
io::stdin().as_raw_handle() io::stdin().as_raw_handle()

@ -163,7 +163,7 @@ impl futures::io::AsyncWrite for Stdout {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, RawFd};
use crate::os::windows::io::{AsRawHandle, RawHandle}; use crate::os::windows::io::{AsRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -173,9 +173,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for Stdout { impl AsRawFd for Stdout {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
io::stdout().as_raw_fd() io::stdout().as_raw_fd()
@ -184,9 +184,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
impl AsRawHandle for Stdout { impl AsRawHandle for Stdout {
fn as_raw_handle(&self) -> RawHandle { fn as_raw_handle(&self) -> RawHandle {
io::stdout().as_raw_handle() io::stdout().as_raw_handle()

@ -10,7 +10,7 @@ use crate::io;
use crate::task::{Context, Poll}; use crate::task::{Context, Poll};
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
#[doc(hidden)] #[doc(hidden)]
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
@ -33,7 +33,7 @@ cfg_if! {
/// ///
/// [`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html /// [`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
/// [`futures::io::AsyncWrite`]: /// [`futures::io::AsyncWrite`]:
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html /// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html
pub trait Write { pub trait Write {
/// Writes some bytes into the byte stream. /// Writes some bytes into the byte stream.
/// ///

@ -20,7 +20,7 @@
//! ``` //! ```
#![feature(async_await)] #![feature(async_await)]
#![cfg_attr(feature = "docs.rs", feature(doc_cfg))] #![cfg_attr(feature = "docs", feature(doc_cfg))]
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")] #![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]

@ -260,7 +260,7 @@ impl From<net::TcpListener> for TcpListener {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
// use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; // use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -270,9 +270,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for TcpListener { impl AsRawFd for TcpListener {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
self.raw_fd self.raw_fd
@ -293,9 +293,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] #[cfg_attr(feature = "docs", doc(cfg(windows)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
// impl AsRawSocket for TcpListener { // impl AsRawSocket for TcpListener {
// fn as_raw_socket(&self) -> RawSocket { // fn as_raw_socket(&self) -> RawSocket {
// self.raw_socket // self.raw_socket

@ -24,9 +24,9 @@ use crate::task::{Context, Poll};
/// [`connect`]: struct.TcpStream.html#method.connect /// [`connect`]: struct.TcpStream.html#method.connect
/// [accepting]: struct.TcpListener.html#method.accept /// [accepting]: struct.TcpListener.html#method.accept
/// [listener]: struct.TcpListener.html /// [listener]: struct.TcpListener.html
/// [`AsyncRead`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html /// [`AsyncRead`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html
/// [`AsyncWrite`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html /// [`AsyncWrite`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html
/// [`futures::io`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io /// [`futures::io`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io
/// [`shutdown`]: struct.TcpStream.html#method.shutdown /// [`shutdown`]: struct.TcpStream.html#method.shutdown
/// [`std::net::TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html /// [`std::net::TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html
/// ///
@ -463,7 +463,7 @@ impl From<net::TcpStream> for TcpStream {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
// use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; // use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -473,9 +473,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for TcpStream { impl AsRawFd for TcpStream {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
self.raw_fd self.raw_fd
@ -496,9 +496,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] #[cfg_attr(feature = "docs", doc(cfg(windows)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
// impl AsRawSocket for TcpStream { // impl AsRawSocket for TcpStream {
// fn as_raw_socket(&self) -> RawSocket { // fn as_raw_socket(&self) -> RawSocket {
// self.raw_socket // self.raw_socket

@ -537,7 +537,7 @@ impl From<net::UdpSocket> for UdpSocket {
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
// use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; // use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
} else if #[cfg(unix)] { } else if #[cfg(unix)] {
@ -547,9 +547,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
cfg_if! { cfg_if! {
if #[cfg(any(unix, feature = "docs.rs"))] { if #[cfg(any(unix, feature = "docs"))] {
impl AsRawFd for UdpSocket { impl AsRawFd for UdpSocket {
fn as_raw_fd(&self) -> RawFd { fn as_raw_fd(&self) -> RawFd {
self.raw_fd self.raw_fd
@ -570,9 +570,9 @@ cfg_if! {
} }
} }
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] #[cfg_attr(feature = "docs", doc(cfg(windows)))]
cfg_if! { cfg_if! {
if #[cfg(any(windows, feature = "docs.rs"))] { if #[cfg(any(windows, feature = "docs"))] {
// use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket}; // use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket};
// //
// impl AsRawSocket for UdpSocket { // impl AsRawSocket for UdpSocket {

@ -1,9 +1,9 @@
//! OS-specific extensions. //! OS-specific extensions.
#[cfg(any(unix, feature = "docs.rs"))] #[cfg(any(unix, feature = "docs"))]
#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] #[cfg_attr(feature = "docs", doc(cfg(unix)))]
pub mod unix; pub mod unix;
#[cfg(any(windows, feature = "docs.rs"))] #[cfg(any(windows, feature = "docs"))]
#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] #[cfg_attr(feature = "docs", doc(cfg(windows)))]
pub mod windows; pub mod windows;

@ -34,7 +34,7 @@ pub async fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Resu
} }
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
/// Unix-specific extensions to `DirBuilder`. /// Unix-specific extensions to `DirBuilder`.
pub trait DirBuilderExt { pub trait DirBuilderExt {
/// Sets the mode to create new directories with. This option defaults to /// Sets the mode to create new directories with. This option defaults to

@ -3,7 +3,7 @@
use cfg_if::cfg_if; use cfg_if::cfg_if;
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
/// Raw file descriptors. /// Raw file descriptors.
pub type RawFd = std::os::raw::c_int; pub type RawFd = std::os::raw::c_int;

@ -43,14 +43,14 @@ use crate::task::{blocking, Poll};
/// # Ok(()) }) } /// # Ok(()) }) }
/// ``` /// ```
pub struct UnixDatagram { pub struct UnixDatagram {
#[cfg(not(feature = "docs.rs"))] #[cfg(not(feature = "docs"))]
io_handle: IoHandle<mio_uds::UnixDatagram>, io_handle: IoHandle<mio_uds::UnixDatagram>,
raw_fd: RawFd, raw_fd: RawFd,
} }
impl UnixDatagram { impl UnixDatagram {
#[cfg(not(feature = "docs.rs"))] #[cfg(not(feature = "docs"))]
fn new(socket: mio_uds::UnixDatagram) -> UnixDatagram { fn new(socket: mio_uds::UnixDatagram) -> UnixDatagram {
UnixDatagram { UnixDatagram {
raw_fd: socket.as_raw_fd(), raw_fd: socket.as_raw_fd(),

@ -50,7 +50,7 @@ use crate::task::{blocking, Context, Poll};
/// # Ok(()) }) } /// # Ok(()) }) }
/// ``` /// ```
pub struct UnixListener { pub struct UnixListener {
#[cfg(not(feature = "docs.rs"))] #[cfg(not(feature = "docs"))]
io_handle: IoHandle<mio_uds::UnixListener>, io_handle: IoHandle<mio_uds::UnixListener>,
raw_fd: RawFd, raw_fd: RawFd,

@ -11,7 +11,7 @@ mod listener;
mod stream; mod stream;
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
use std::fmt; use std::fmt;
use std::path::Path; use std::path::Path;

@ -40,7 +40,7 @@ use crate::task::{blocking, Context, Poll};
/// # Ok(()) }) } /// # Ok(()) }) }
/// ``` /// ```
pub struct UnixStream { pub struct UnixStream {
#[cfg(not(feature = "docs.rs"))] #[cfg(not(feature = "docs"))]
pub(super) io_handle: IoHandle<mio_uds::UnixStream>, pub(super) io_handle: IoHandle<mio_uds::UnixStream>,
pub(super) raw_fd: RawFd, pub(super) raw_fd: RawFd,

@ -3,7 +3,7 @@
use cfg_if::cfg_if; use cfg_if::cfg_if;
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
/// Raw HANDLEs. /// Raw HANDLEs.
pub type RawHandle = *mut std::os::raw::c_void; pub type RawHandle = *mut std::os::raw::c_void;

@ -29,7 +29,7 @@ use crate::future::Future;
use crate::task::{Context, Poll}; use crate::task::{Context, Poll};
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
#[doc(hidden)] #[doc(hidden)]
pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>);
@ -52,7 +52,7 @@ cfg_if! {
/// ///
/// [`std::iter::Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html /// [`std::iter::Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
/// [`futures::stream::Stream`]: /// [`futures::stream::Stream`]:
/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/stream/trait.Stream.html /// https://docs/futures-preview/0.3.0-alpha.17/futures/stream/trait.Stream.html
pub trait Stream { pub trait Stream {
/// The type of items yielded by this stream. /// The type of items yielded by this stream.
type Item; type Item;

@ -40,7 +40,7 @@ use crate::io;
use crate::task::{Context, Poll}; use crate::task::{Context, Poll};
cfg_if! { cfg_if! {
if #[cfg(feature = "docs.rs")] { if #[cfg(feature = "docs")] {
#[doc(hidden)] #[doc(hidden)]
pub struct ImplFuture<T>(std::marker::PhantomData<T>); pub struct ImplFuture<T>(std::marker::PhantomData<T>);

Loading…
Cancel
Save