diff options
author | 2023-01-31 11:42:28 +0100 | |
---|---|---|
committer | 2023-01-31 11:42:28 +0100 | |
commit | f15bba3375f7e75f412b085f75b3112cceaa6ef1 (patch) | |
tree | 4dbf6a5689597df7f7483baf169e500fe972d160 /src | |
parent | c93a94b974d8c7c926c4e49ed4ce4645fb0e3801 (diff) | |
download | bytes-f15bba3375f7e75f412b085f75b3112cceaa6ef1.tar.gz bytes-f15bba3375f7e75f412b085f75b3112cceaa6ef1.tar.zst bytes-f15bba3375f7e75f412b085f75b3112cceaa6ef1.zip |
Document which functions require `std` (#591)
Diffstat (limited to 'src')
-rw-r--r-- | src/buf/buf_impl.rs | 2 | ||||
-rw-r--r-- | src/buf/buf_mut.rs | 1 | ||||
-rw-r--r-- | src/lib.rs | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/buf/buf_impl.rs b/src/buf/buf_impl.rs index d903d5c..366cfc9 100644 --- a/src/buf/buf_impl.rs +++ b/src/buf/buf_impl.rs @@ -160,6 +160,7 @@ pub trait Buf { /// /// [`writev`]: http://man7.org/linux/man-pages/man2/readv.2.html #[cfg(feature = "std")] + #[cfg_attr(docsrs, doc(cfg(feature = "std")))] fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize { if dst.is_empty() { return 0; @@ -1183,6 +1184,7 @@ pub trait Buf { /// assert_eq!(&dst[..11], &b"hello world"[..]); /// ``` #[cfg(feature = "std")] + #[cfg_attr(docsrs, doc(cfg(feature = "std")))] fn reader(self) -> Reader<Self> where Self: Sized, diff --git a/src/buf/buf_mut.rs b/src/buf/buf_mut.rs index ada07a3..685fcc7 100644 --- a/src/buf/buf_mut.rs +++ b/src/buf/buf_mut.rs @@ -1239,6 +1239,7 @@ pub unsafe trait BufMut { /// assert_eq!(*buf, b"hello world"[..]); /// ``` #[cfg(feature = "std")] + #[cfg_attr(docsrs, doc(cfg(feature = "std")))] fn writer(self) -> Writer<Self> where Self: Sized, @@ -4,6 +4,7 @@ attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) ))] #![no_std] +#![cfg_attr(docsrs, feature(doc_cfg))] //! Provides abstractions for working with bytes. //! |