diff options
author | Vincent Dagonneau <vincentdagonneau@gmail.com> | 2020-03-19 11:40:53 +0100 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-12-20 18:47:16 -0700 |
commit | 5f5b7d4d7a76575673b57e685c13ba2c52c4183e (patch) | |
tree | 75b45fc8b1b70750783e89069bc4d90810c500fe /src/sys/aio.rs | |
parent | d1c6fed481638405b0a87e5b7eecf82ce89b2268 (diff) | |
download | nix-5f5b7d4d7a76575673b57e685c13ba2c52c4183e.zip |
feature-gate most Nix functions
Using features reduces build time and size for consumer crates. By
default all features are enabled.
Diffstat (limited to 'src/sys/aio.rs')
-rw-r--r-- | src/sys/aio.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sys/aio.rs b/src/sys/aio.rs index e64a2a82..856becb8 100644 --- a/src/sys/aio.rs +++ b/src/sys/aio.rs @@ -49,6 +49,7 @@ libc_enum! { target_os = "macos", target_os = "netbsd", target_os = "openbsd"))] + #[cfg_attr(docsrs, doc(cfg(all())))] O_DSYNC } } @@ -797,6 +798,7 @@ impl<'a> Drop for AioCb<'a> { /// /// The basic structure used to issue multiple AIO operations simultaneously. #[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg_attr(docsrs, doc(cfg(all())))] pub struct LioCb<'a> { /// A collection of [`AioCb`]s. All of these will be issued simultaneously /// by the [`listio`] method. @@ -828,6 +830,7 @@ unsafe impl<'a> Send for LioCb<'a> {} unsafe impl<'a> Sync for LioCb<'a> {} #[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg_attr(docsrs, doc(cfg(all())))] impl<'a> LioCb<'a> { /// Are no [`AioCb`]s contained? pub fn is_empty(&self) -> bool { @@ -1036,6 +1039,7 @@ impl<'a> Debug for LioCb<'a> { // LioCbBuilder must use a Vec to make construction possible when the final size // is unknown. #[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg_attr(docsrs, doc(cfg(all())))] #[derive(Debug)] pub struct LioCbBuilder<'a> { /// A collection of [`AioCb`]s. @@ -1045,6 +1049,7 @@ pub struct LioCbBuilder<'a> { } #[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg_attr(docsrs, doc(cfg(all())))] impl<'a> LioCbBuilder<'a> { /// Initialize an empty `LioCb` pub fn with_capacity(capacity: usize) -> LioCbBuilder<'a> { |