mirror of https://github.com/aya-rs/aya
docs: Add labels for optional features
Following the lead of crates like tokio and nix, we now annotate APIs that require optional features. This helps in cases where a user wants to have an `AsyncPerfEventArray` which is documented on crates.io, but it's not obvious that you have to enable the `async` feature. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>pull/404/head
parent
3f2f3a8be0
commit
95e8c78db8
@ -1,12 +1,14 @@
|
||||
//! Ring buffer types used to receive events from eBPF programs using the linux `perf` API.
|
||||
//!
|
||||
//! See the [`PerfEventArray`] and [`AsyncPerfEventArray`].
|
||||
#[cfg(any(feature = "async", doc))]
|
||||
#[cfg(any(feature = "async"))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
|
||||
mod async_perf_event_array;
|
||||
mod perf_buffer;
|
||||
mod perf_event_array;
|
||||
|
||||
#[cfg(any(feature = "async", doc))]
|
||||
#[cfg(any(feature = "async"))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
|
||||
pub use async_perf_event_array::*;
|
||||
pub use perf_buffer::*;
|
||||
pub use perf_event_array::*;
|
||||
|
Loading…
Reference in New Issue