aya: remove `AsyncPerfEventArray{,Buffer}`

Rather than support N async runtimes, push this to the user. The
relevant types (`PerfEventArrayBuffer` and `RingBuffer`) implement
`As{,Raw}Fd` which is sufficient with integration with tokio, smol, and
other async runtimes.
reviewable/pr1292/r1
Tamir Duberstein 5 days ago
parent ab182be622
commit 35332f2288
No known key found for this signature in database

@ -63,7 +63,6 @@ rust-version = "1.85.0"
[workspace.dependencies]
anyhow = { version = "1", default-features = false }
assert_matches = { version = "1.5.0", default-features = false }
async-io = { version = "2.0", default-features = false }
base64 = { version = "0.22.1", default-features = false }
bindgen = { version = "0.72", default-features = false }
bitflags = { version = "2.2.1", default-features = false }

@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Breaking Changes
- Remove `AsyncPerfEventArray` and `AsyncPerfEventArrayBuffer` These types have been removed to
avoid maintaining support for multiple async runtimes. Use `PerfEventArrayBuffer`, which
implements `As{,Raw}Fd` for integration with async executors.
## 0.13.1 (2024-11-01)
### Chore

@ -18,7 +18,6 @@ workspace = true
[dependencies]
assert_matches = { workspace = true }
async-io = { workspace = true, optional = true }
aya-obj = { path = "../aya-obj", version = "^0.2.1", features = ["std"] }
bitflags = { workspace = true }
bytes = { workspace = true }
@ -28,16 +27,10 @@ log = { workspace = true }
object = { workspace = true, features = ["elf", "read_core", "std", "write"] }
once_cell = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt"], optional = true }
[dev-dependencies]
tempfile = { workspace = true }
[features]
async_std = ["dep:async-io"]
async_tokio = ["tokio/net"]
default = []
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs", "-D", "warnings"]

@ -67,10 +67,6 @@
//unused_qualifications, https://github.com/rust-lang/rust/commit/9ccc7b7 added size_of to the prelude, but we need to continue to qualify it so that we build on older compilers.
//unused_results,
)]
#![cfg_attr(
all(feature = "async_tokio", feature = "async_std"),
expect(unused_crate_dependencies)
)]
mod bpf;
pub mod maps;

@ -185,8 +185,8 @@ pub enum MapType {
/// Introduced in kernel v4.2.
#[doc(alias = "BPF_MAP_TYPE_PROG_ARRAY")]
ProgramArray = bpf_map_type::BPF_MAP_TYPE_PROG_ARRAY as isize,
/// A Perf Event Array map type. See [`PerfEventArray`](super::perf::PerfEventArray) and
/// [`AsyncPerfEventArray`](super::perf::AsyncPerfEventArray) for the map implementations.
/// A Perf Event Array map type. See [`PerfEventArray`](super::perf::PerfEventArray) for the map
/// implementation.
///
/// Introduced in kernel v4.3.
#[doc(alias = "BPF_MAP_TYPE_PERF_EVENT_ARRAY")]

@ -92,9 +92,6 @@ pub use bloom_filter::BloomFilter;
pub use hash_map::{HashMap, PerCpuHashMap};
pub use info::{MapInfo, MapType, loaded_maps};
pub use lpm_trie::LpmTrie;
#[cfg(any(feature = "async_tokio", feature = "async_std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))]
pub use perf::AsyncPerfEventArray;
pub use perf::PerfEventArray;
pub use queue::Queue;
pub use ring_buf::RingBuf;
@ -487,9 +484,6 @@ impl_try_from_map!(() {
SockMap,
StackTraceMap,
XskMap,
#[cfg(any(feature = "async_tokio", feature = "async_std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))]
AsyncPerfEventArray from PerfEventArray,
});
impl_try_from_map!((V) {

@ -1,185 +0,0 @@
use std::{
borrow::{Borrow, BorrowMut},
path::Path,
};
// See https://doc.rust-lang.org/cargo/reference/features.html#mutually-exclusive-features.
//
// We should eventually split async functionality out into separate crates "aya-async-tokio" and
// "async-async-std". Presently we arbitrarily choose tokio over async-std when both are requested.
#[cfg(all(not(feature = "async_tokio"), feature = "async_std"))]
use async_io::Async;
use bytes::BytesMut;
#[cfg(feature = "async_tokio")]
use tokio::io::unix::AsyncFd;
use crate::maps::{
MapData, MapError, PinError,
perf::{Events, PerfBufferError, PerfEventArray, PerfEventArrayBuffer},
};
/// A `Future` based map that can be used to receive events from eBPF programs using the linux
/// [`perf`](https://perf.wiki.kernel.org/index.php/Main_Page) API.
///
/// This is the async version of [`PerfEventArray`], which provides integration
/// with [tokio](https://docs.rs/tokio) and [async-std](https:/docs.rs/async-std) and a nice `Future` based API.
///
/// To receive events you need to:
/// * call [`AsyncPerfEventArray::open`]
/// * call [`AsyncPerfEventArrayBuffer::read_events`] to read the events
///
/// # Minimum kernel version
///
/// The minimum kernel version required to use this feature is 4.3.
///
/// # Examples
///
/// ```no_run
/// # #[derive(thiserror::Error, Debug)]
/// # enum Error {
/// # #[error(transparent)]
/// # IO(#[from] std::io::Error),
/// # #[error(transparent)]
/// # Map(#[from] aya::maps::MapError),
/// # #[error(transparent)]
/// # Ebpf(#[from] aya::EbpfError),
/// # #[error(transparent)]
/// # PerfBuf(#[from] aya::maps::perf::PerfBufferError),
/// # }
/// # #[cfg(feature = "async_tokio")]
/// # async fn try_main() -> Result<(), Error> {
/// # let mut bpf = aya::Ebpf::load(&[])?;
/// use aya::maps::perf::{AsyncPerfEventArray, PerfBufferError};
/// use aya::util::online_cpus;
/// use bytes::BytesMut;
/// use tokio::task; // or async_std::task
///
/// // try to convert the PERF_ARRAY map to an AsyncPerfEventArray
/// let mut perf_array = AsyncPerfEventArray::try_from(bpf.take_map("PERF_ARRAY").unwrap())?;
///
/// for cpu_id in online_cpus().map_err(|(_, error)| error)? {
/// // open a separate perf buffer for each cpu
/// let mut buf = perf_array.open(cpu_id, None)?;
///
/// // process each perf buffer in a separate task
/// task::spawn(async move {
/// let mut buffers = std::iter::repeat_n(BytesMut::with_capacity(1024), 10)
/// .collect::<Vec<_>>();
///
/// loop {
/// // wait for events
/// let events = buf.read_events(&mut buffers).await?;
///
/// // events.read contains the number of events that have been read,
/// // and is always <= buffers.len()
/// for i in 0..events.read {
/// let buf = &mut buffers[i];
/// // process buf
/// }
/// }
///
/// Ok::<_, PerfBufferError>(())
/// });
/// }
///
/// # Ok(())
/// # }
/// ```
#[doc(alias = "BPF_MAP_TYPE_PERF_EVENT_ARRAY")]
pub struct AsyncPerfEventArray<T> {
perf_map: PerfEventArray<T>,
}
impl<T: BorrowMut<MapData>> AsyncPerfEventArray<T> {
/// Opens the perf buffer at the given index.
///
/// The returned buffer will receive all the events eBPF programs send at the given index.
pub fn open(
&mut self,
index: u32,
page_count: Option<usize>,
) -> Result<AsyncPerfEventArrayBuffer<T>, PerfBufferError> {
let Self { perf_map } = self;
let buf = perf_map.open(index, page_count)?;
#[cfg(feature = "async_tokio")]
let buf = AsyncFd::new(buf)?;
#[cfg(all(not(feature = "async_tokio"), feature = "async_std"))]
let buf = Async::new(buf)?;
Ok(AsyncPerfEventArrayBuffer { buf })
}
/// Pins the map to a BPF filesystem.
///
/// When a map is pinned it will remain loaded until the corresponding file
/// is deleted. All parent directories in the given `path` must already exist.
pub fn pin<P: AsRef<Path>>(&self, path: P) -> Result<(), PinError> {
self.perf_map.pin(path)
}
}
impl<T: Borrow<MapData>> AsyncPerfEventArray<T> {
pub(crate) fn new(map: T) -> Result<Self, MapError> {
Ok(Self {
perf_map: PerfEventArray::new(map)?,
})
}
}
/// A `Future` based ring buffer that can receive events from eBPF programs.
///
/// [`AsyncPerfEventArrayBuffer`] is a ring buffer that can receive events from eBPF programs that
/// use `bpf_perf_event_output()`. It's returned by [`AsyncPerfEventArray::open`].
///
/// See the [`AsyncPerfEventArray` documentation](AsyncPerfEventArray) for an overview of how to
/// use perf buffers.
pub struct AsyncPerfEventArrayBuffer<T: BorrowMut<MapData>> {
#[cfg(not(any(feature = "async_tokio", feature = "async_std")))]
buf: PerfEventArrayBuffer<T>,
#[cfg(feature = "async_tokio")]
buf: AsyncFd<PerfEventArrayBuffer<T>>,
#[cfg(all(not(feature = "async_tokio"), feature = "async_std"))]
buf: Async<PerfEventArrayBuffer<T>>,
}
impl<T: BorrowMut<MapData>> AsyncPerfEventArrayBuffer<T> {
/// Reads events from the buffer.
///
/// This method reads events into the provided slice of buffers, filling
/// each buffer in order stopping when there are no more events to read or
/// all the buffers have been filled.
///
/// Returns the number of events read and the number of events lost. Events
/// are lost when user space doesn't read events fast enough and the ring
/// buffer fills up.
pub async fn read_events(
&mut self,
buffers: &mut [BytesMut],
) -> Result<Events, PerfBufferError> {
let Self { buf } = self;
loop {
#[cfg(feature = "async_tokio")]
let mut guard = buf.readable_mut().await?;
#[cfg(feature = "async_tokio")]
let buf = guard.get_inner_mut();
#[cfg(all(not(feature = "async_tokio"), feature = "async_std"))]
let buf = {
if !buf.get_ref().readable() {
buf.readable().await?;
}
unsafe { buf.get_mut() }
};
let events = buf.read_events(buffers)?;
const EMPTY: Events = Events { read: 0, lost: 0 };
if events != EMPTY {
break Ok(events);
}
#[cfg(feature = "async_tokio")]
guard.clear_ready();
}
}
}

@ -1,15 +1,9 @@
//! Ring buffer types used to receive events from eBPF programs using the linux
//! `perf` API.
//!
//! See [`PerfEventArray`] and [`AsyncPerfEventArray`].
#[cfg(any(feature = "async_tokio", feature = "async_std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))]
mod async_perf_event_array;
//! See [`PerfEventArray`].
mod perf_buffer;
mod perf_event_array;
#[cfg(any(feature = "async_tokio", feature = "async_std"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "async_tokio", feature = "async_std"))))]
pub use async_perf_event_array::*;
pub use perf_buffer::*;
pub use perf_event_array::*;

@ -151,16 +151,9 @@ impl<T: BorrowMut<MapData>> AsRawFd for PerfEventArrayBuffer<T> {
/// amounts of data, in order not to lose events you might want to process each
/// [`PerfEventArrayBuffer`] on a different thread.
///
/// # Async
///
/// If you are using [tokio] or [async-std], you should use `AsyncPerfEventArray` which
/// efficiently integrates with those and provides a nicer `Future` based API.
///
/// [`perf`]: https://perf.wiki.kernel.org/index.php/Main_Page
/// [epoll]: https://docs.rs/epoll
/// [mio]: https://docs.rs/mio
/// [tokio]: https://docs.rs/tokio
/// [async-std]: https://docs.rs/async-std
#[doc(alias = "BPF_MAP_TYPE_PERF_EVENT_ARRAY")]
pub struct PerfEventArray<T> {
map: Arc<T>,

@ -83,9 +83,11 @@ use crate::{
/// # Polling
///
/// In the example above the implementations of poll(), poll.readable(), guard.inner_mut(), and
/// guard.clear_ready() are not given. RingBuf implements the AsRawFd trait, so you can implement
/// polling using any crate that can poll file descriptors, like epoll, mio etc. The above example
/// API is motivated by that of [`tokio::io::unix::AsyncFd`].
/// guard.clear_ready() are not given. RingBuf implements [`AsRawFd`], so you can implement polling
/// using any crate that can poll file descriptors, like epoll, mio etc. The above example API is
/// motivated by that of [`tokio::io::unix::AsyncFd`].
///
/// [`tokio::io::unix::AsyncFd`]: https://docs.rs/tokio/latest/tokio/io/unix/struct.AsyncFd.html
#[doc(alias = "BPF_MAP_TYPE_RINGBUF")]
pub struct RingBuf<T> {
map: T,

@ -396,66 +396,6 @@ impl<T> core::borrow::BorrowMut<T> for aya::maps::perf::PerfBufferError where T:
pub fn aya::maps::perf::PerfBufferError::borrow_mut(&mut self) -> &mut T
impl<T> core::convert::From<T> for aya::maps::perf::PerfBufferError
pub fn aya::maps::perf::PerfBufferError::from(t: T) -> T
pub struct aya::maps::perf::AsyncPerfEventArray<T>
impl<T: core::borrow::BorrowMut<aya::maps::MapData>> aya::maps::perf::AsyncPerfEventArray<T>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::open(&mut self, index: u32, page_count: core::option::Option<usize>) -> core::result::Result<aya::maps::perf::AsyncPerfEventArrayBuffer<T>, aya::maps::perf::PerfBufferError>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::pin<P: core::convert::AsRef<std::path::Path>>(&self, path: P) -> core::result::Result<(), aya::pin::PinError>
impl core::convert::TryFrom<aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>::try_from(map: aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<T> core::marker::Freeze for aya::maps::perf::AsyncPerfEventArray<T>
impl<T> core::marker::Send for aya::maps::perf::AsyncPerfEventArray<T> where T: core::marker::Sync + core::marker::Send
impl<T> core::marker::Sync for aya::maps::perf::AsyncPerfEventArray<T> where T: core::marker::Sync + core::marker::Send
impl<T> core::marker::Unpin for aya::maps::perf::AsyncPerfEventArray<T>
impl<T> core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::AsyncPerfEventArray<T> where T: core::panic::unwind_safe::RefUnwindSafe
impl<T> core::panic::unwind_safe::UnwindSafe for aya::maps::perf::AsyncPerfEventArray<T> where T: core::panic::unwind_safe::RefUnwindSafe
impl<T, U> core::convert::Into<U> for aya::maps::perf::AsyncPerfEventArray<T> where U: core::convert::From<T>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::into(self) -> U
impl<T, U> core::convert::TryFrom<U> for aya::maps::perf::AsyncPerfEventArray<T> where U: core::convert::Into<T>
pub type aya::maps::perf::AsyncPerfEventArray<T>::Error = core::convert::Infallible
pub fn aya::maps::perf::AsyncPerfEventArray<T>::try_from(value: U) -> core::result::Result<T, <T as core::convert::TryFrom<U>>::Error>
impl<T, U> core::convert::TryInto<U> for aya::maps::perf::AsyncPerfEventArray<T> where U: core::convert::TryFrom<T>
pub type aya::maps::perf::AsyncPerfEventArray<T>::Error = <U as core::convert::TryFrom<T>>::Error
pub fn aya::maps::perf::AsyncPerfEventArray<T>::try_into(self) -> core::result::Result<U, <U as core::convert::TryFrom<T>>::Error>
impl<T> core::any::Any for aya::maps::perf::AsyncPerfEventArray<T> where T: 'static + ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArray<T>::type_id(&self) -> core::any::TypeId
impl<T> core::borrow::Borrow<T> for aya::maps::perf::AsyncPerfEventArray<T> where T: ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArray<T>::borrow(&self) -> &T
impl<T> core::borrow::BorrowMut<T> for aya::maps::perf::AsyncPerfEventArray<T> where T: ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArray<T>::borrow_mut(&mut self) -> &mut T
impl<T> core::convert::From<T> for aya::maps::perf::AsyncPerfEventArray<T>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::from(t: T) -> T
pub struct aya::maps::perf::AsyncPerfEventArrayBuffer<T: core::borrow::BorrowMut<aya::maps::MapData>>
impl<T: core::borrow::BorrowMut<aya::maps::MapData>> aya::maps::perf::AsyncPerfEventArrayBuffer<T>
pub async fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::read_events(&mut self, buffers: &mut [bytes::bytes_mut::BytesMut]) -> core::result::Result<aya::maps::perf::Events, aya::maps::perf::PerfBufferError>
impl<T> core::marker::Freeze for aya::maps::perf::AsyncPerfEventArrayBuffer<T>
impl<T> core::marker::Send for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where T: core::marker::Sync + core::marker::Send
impl<T> core::marker::Sync for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where T: core::marker::Sync + core::marker::Send
impl<T> core::marker::Unpin for aya::maps::perf::AsyncPerfEventArrayBuffer<T>
impl<T> !core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::AsyncPerfEventArrayBuffer<T>
impl<T> !core::panic::unwind_safe::UnwindSafe for aya::maps::perf::AsyncPerfEventArrayBuffer<T>
impl<T, U> core::convert::Into<U> for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where U: core::convert::From<T>
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::into(self) -> U
impl<T, U> core::convert::TryFrom<U> for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where U: core::convert::Into<T>
pub type aya::maps::perf::AsyncPerfEventArrayBuffer<T>::Error = core::convert::Infallible
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::try_from(value: U) -> core::result::Result<T, <T as core::convert::TryFrom<U>>::Error>
impl<T, U> core::convert::TryInto<U> for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where U: core::convert::TryFrom<T>
pub type aya::maps::perf::AsyncPerfEventArrayBuffer<T>::Error = <U as core::convert::TryFrom<T>>::Error
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::try_into(self) -> core::result::Result<U, <U as core::convert::TryFrom<T>>::Error>
impl<T> core::any::Any for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where T: 'static + ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::type_id(&self) -> core::any::TypeId
impl<T> core::borrow::Borrow<T> for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where T: ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::borrow(&self) -> &T
impl<T> core::borrow::BorrowMut<T> for aya::maps::perf::AsyncPerfEventArrayBuffer<T> where T: ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::borrow_mut(&mut self) -> &mut T
impl<T> core::convert::From<T> for aya::maps::perf::AsyncPerfEventArrayBuffer<T>
pub fn aya::maps::perf::AsyncPerfEventArrayBuffer<T>::from(t: T) -> T
pub struct aya::maps::perf::Events
pub aya::maps::perf::Events::lost: usize
pub aya::maps::perf::Events::read: usize
@ -1160,9 +1100,6 @@ pub fn aya::maps::SockMap<aya::maps::MapData>::try_from(map: aya::maps::Map) ->
impl core::convert::TryFrom<aya::maps::Map> for aya::maps::XskMap<aya::maps::MapData>
pub type aya::maps::XskMap<aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::XskMap<aya::maps::MapData>::try_from(map: aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl core::convert::TryFrom<aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>::try_from(map: aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl core::convert::TryFrom<aya::maps::Map> for aya::maps::perf::PerfEventArray<aya::maps::MapData>
pub type aya::maps::perf::PerfEventArray<aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::PerfEventArray<aya::maps::MapData>::try_from(map: aya::maps::Map) -> core::result::Result<Self, Self::Error>
@ -1246,9 +1183,6 @@ pub fn aya::maps::SockMap<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::
impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::XskMap<&'a aya::maps::MapData>
pub type aya::maps::XskMap<&'a aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::XskMap<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::PerfEventArray<&'a aya::maps::MapData>
pub type aya::maps::perf::PerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::PerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result<Self, Self::Error>
@ -1276,9 +1210,6 @@ pub fn aya::maps::SockMap<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya
impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::XskMap<&'a mut aya::maps::MapData>
pub type aya::maps::XskMap<&'a mut aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::XskMap<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::PerfEventArray<&'a mut aya::maps::MapData>
pub type aya::maps::perf::PerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::PerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result<Self, Self::Error>
@ -1525,41 +1456,6 @@ impl<T> core::borrow::BorrowMut<T> for aya::maps::array::Array<T, V> where T: ?c
pub fn aya::maps::array::Array<T, V>::borrow_mut(&mut self) -> &mut T
impl<T> core::convert::From<T> for aya::maps::array::Array<T, V>
pub fn aya::maps::array::Array<T, V>::from(t: T) -> T
pub struct aya::maps::AsyncPerfEventArray<T>
impl<T: core::borrow::BorrowMut<aya::maps::MapData>> aya::maps::perf::AsyncPerfEventArray<T>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::open(&mut self, index: u32, page_count: core::option::Option<usize>) -> core::result::Result<aya::maps::perf::AsyncPerfEventArrayBuffer<T>, aya::maps::perf::PerfBufferError>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::pin<P: core::convert::AsRef<std::path::Path>>(&self, path: P) -> core::result::Result<(), aya::pin::PinError>
impl core::convert::TryFrom<aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<aya::maps::MapData>::try_from(map: aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<&'a aya::maps::MapData>::try_from(map: &'a aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<'a> core::convert::TryFrom<&'a mut aya::maps::Map> for aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>
pub type aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::Error = aya::maps::MapError
pub fn aya::maps::perf::AsyncPerfEventArray<&'a mut aya::maps::MapData>::try_from(map: &'a mut aya::maps::Map) -> core::result::Result<Self, Self::Error>
impl<T> core::marker::Freeze for aya::maps::perf::AsyncPerfEventArray<T>
impl<T> core::marker::Send for aya::maps::perf::AsyncPerfEventArray<T> where T: core::marker::Sync + core::marker::Send
impl<T> core::marker::Sync for aya::maps::perf::AsyncPerfEventArray<T> where T: core::marker::Sync + core::marker::Send
impl<T> core::marker::Unpin for aya::maps::perf::AsyncPerfEventArray<T>
impl<T> core::panic::unwind_safe::RefUnwindSafe for aya::maps::perf::AsyncPerfEventArray<T> where T: core::panic::unwind_safe::RefUnwindSafe
impl<T> core::panic::unwind_safe::UnwindSafe for aya::maps::perf::AsyncPerfEventArray<T> where T: core::panic::unwind_safe::RefUnwindSafe
impl<T, U> core::convert::Into<U> for aya::maps::perf::AsyncPerfEventArray<T> where U: core::convert::From<T>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::into(self) -> U
impl<T, U> core::convert::TryFrom<U> for aya::maps::perf::AsyncPerfEventArray<T> where U: core::convert::Into<T>
pub type aya::maps::perf::AsyncPerfEventArray<T>::Error = core::convert::Infallible
pub fn aya::maps::perf::AsyncPerfEventArray<T>::try_from(value: U) -> core::result::Result<T, <T as core::convert::TryFrom<U>>::Error>
impl<T, U> core::convert::TryInto<U> for aya::maps::perf::AsyncPerfEventArray<T> where U: core::convert::TryFrom<T>
pub type aya::maps::perf::AsyncPerfEventArray<T>::Error = <U as core::convert::TryFrom<T>>::Error
pub fn aya::maps::perf::AsyncPerfEventArray<T>::try_into(self) -> core::result::Result<U, <U as core::convert::TryFrom<T>>::Error>
impl<T> core::any::Any for aya::maps::perf::AsyncPerfEventArray<T> where T: 'static + ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArray<T>::type_id(&self) -> core::any::TypeId
impl<T> core::borrow::Borrow<T> for aya::maps::perf::AsyncPerfEventArray<T> where T: ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArray<T>::borrow(&self) -> &T
impl<T> core::borrow::BorrowMut<T> for aya::maps::perf::AsyncPerfEventArray<T> where T: ?core::marker::Sized
pub fn aya::maps::perf::AsyncPerfEventArray<T>::borrow_mut(&mut self) -> &mut T
impl<T> core::convert::From<T> for aya::maps::perf::AsyncPerfEventArray<T>
pub fn aya::maps::perf::AsyncPerfEventArray<T>::from(t: T) -> T
pub struct aya::maps::BloomFilter<T, V: aya::Pod>
impl<T: core::borrow::Borrow<aya::maps::MapData>, V: aya::Pod> aya::maps::bloom_filter::BloomFilter<T, V>
pub fn aya::maps::bloom_filter::BloomFilter<T, V>::contains(&self, value: &V, flags: u64) -> core::result::Result<(), aya::maps::MapError>

Loading…
Cancel
Save