diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs index 64454a3c..0304d243 100644 --- a/aya/src/maps/array/array.rs +++ b/aya/src/maps/array/array.rs @@ -1,7 +1,4 @@ -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_bounds, check_kv_size, IterableMap, MapData, MapError}, @@ -78,7 +75,7 @@ impl, V: Pod> Array { } } -impl, V: Pod> Array { +impl, V: Pod> Array { /// Sets the value of the element at the given index. /// /// # Errors @@ -86,7 +83,7 @@ impl, V: Pod> Array { /// Returns [`MapError::OutOfBounds`] if `index` is out of bounds, [`MapError::SyscallError`] /// if `bpf_map_update_elem` fails. pub fn set(&mut self, index: u32, value: impl Borrow, flags: u64) -> Result<(), MapError> { - let data = self.inner.borrow_mut(); + let data = self.inner.borrow(); check_bounds(data, index)?; let fd = data.fd; bpf_map_update_elem(fd, Some(&index), value.borrow(), flags).map_err(|(_, io_error)| { diff --git a/aya/src/maps/array/per_cpu_array.rs b/aya/src/maps/array/per_cpu_array.rs index db6169bd..ebd823c4 100644 --- a/aya/src/maps/array/per_cpu_array.rs +++ b/aya/src/maps/array/per_cpu_array.rs @@ -1,7 +1,4 @@ -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_bounds, check_kv_size, IterableMap, MapData, MapError, PerCpuValues}, @@ -98,7 +95,7 @@ impl, V: Pod> PerCpuArray { } } -impl, V: Pod> PerCpuArray { +impl, V: Pod> PerCpuArray { /// Sets the values - one for each CPU - at the given index. /// /// # Errors @@ -106,7 +103,7 @@ impl, V: Pod> PerCpuArray { /// Returns [`MapError::OutOfBounds`] if `index` is out of bounds, [`MapError::SyscallError`] /// if `bpf_map_update_elem` fails. pub fn set(&mut self, index: u32, values: PerCpuValues, flags: u64) -> Result<(), MapError> { - let data = self.inner.borrow_mut(); + let data = self.inner.borrow(); check_bounds(data, index)?; let fd = data.fd; diff --git a/aya/src/maps/array/program_array.rs b/aya/src/maps/array/program_array.rs index a38ce023..e2b276ad 100644 --- a/aya/src/maps/array/program_array.rs +++ b/aya/src/maps/array/program_array.rs @@ -1,7 +1,7 @@ //! An array of eBPF program file descriptors used as a jump table. use std::{ - borrow::{Borrow, BorrowMut}, + borrow::Borrow, os::fd::{AsFd as _, AsRawFd as _, RawFd}, }; @@ -66,13 +66,13 @@ impl> ProgramArray { } } -impl> ProgramArray { +impl> ProgramArray { /// Sets the target program file descriptor for the given index in the jump table. /// /// When an eBPF program calls `bpf_tail_call(ctx, prog_array, index)`, control /// flow will jump to `program`. pub fn set(&mut self, index: u32, program: &ProgramFd, flags: u64) -> Result<(), MapError> { - let data = self.inner.borrow_mut(); + let data = self.inner.borrow(); check_bounds(data, index)?; let fd = data.fd; let prog_fd = program.as_fd(); @@ -92,9 +92,9 @@ impl> ProgramArray { /// Calling `bpf_tail_call(ctx, prog_array, index)` on an index that has been cleared returns an /// error. pub fn clear_index(&mut self, index: &u32) -> Result<(), MapError> { - let data = self.inner.borrow_mut(); + let data = self.inner.borrow(); check_bounds(data, *index)?; - let fd = self.inner.borrow_mut().fd; + let fd = self.inner.borrow().fd; bpf_map_delete_elem(fd, index) .map(|_| ()) diff --git a/aya/src/maps/bloom_filter.rs b/aya/src/maps/bloom_filter.rs index 0396d0f6..40125b05 100644 --- a/aya/src/maps/bloom_filter.rs +++ b/aya/src/maps/bloom_filter.rs @@ -1,8 +1,5 @@ //! A Bloom Filter. -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_v_size, MapData, MapError}, @@ -64,10 +61,10 @@ impl, V: Pod> BloomFilter { } } -impl, V: Pod> BloomFilter { +impl, V: Pod> BloomFilter { /// Inserts a value into the map. pub fn insert(&mut self, value: impl Borrow, flags: u64) -> Result<(), MapError> { - let fd = self.inner.borrow_mut().fd; + let fd = self.inner.borrow().fd; bpf_map_push_elem(fd, value.borrow(), flags).map_err(|(_, io_error)| SyscallError { call: "bpf_map_push_elem", io_error, diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs index 1f8a2f9c..3b0e2163 100644 --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -1,7 +1,4 @@ -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_kv_size, hash_map, IterableMap, MapData, MapError, MapIter, MapKeys}, @@ -73,7 +70,7 @@ impl, K: Pod, V: Pod> HashMap { } } -impl, K: Pod, V: Pod> HashMap { +impl, K: Pod, V: Pod> HashMap { /// Inserts a key-value pair into the map. pub fn insert( &mut self, @@ -81,12 +78,12 @@ impl, K: Pod, V: Pod> HashMap { value: impl Borrow, flags: u64, ) -> Result<(), MapError> { - hash_map::insert(self.inner.borrow_mut(), key.borrow(), value.borrow(), flags) + hash_map::insert(self.inner.borrow(), key.borrow(), value.borrow(), flags) } /// Removes a key from the map. pub fn remove(&mut self, key: &K) -> Result<(), MapError> { - hash_map::remove(self.inner.borrow_mut(), key) + hash_map::remove(self.inner.borrow(), key) } } diff --git a/aya/src/maps/hash_map/per_cpu_hash_map.rs b/aya/src/maps/hash_map/per_cpu_hash_map.rs index 5ae177f2..ee7e2064 100644 --- a/aya/src/maps/hash_map/per_cpu_hash_map.rs +++ b/aya/src/maps/hash_map/per_cpu_hash_map.rs @@ -1,8 +1,5 @@ //! Per-CPU hash map. -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{ @@ -83,7 +80,7 @@ impl, K: Pod, V: Pod> PerCpuHashMap { } } -impl, K: Pod, V: Pod> PerCpuHashMap { +impl, K: Pod, V: Pod> PerCpuHashMap { /// Inserts a slice of values - one for each CPU - for the given key. /// /// # Examples @@ -118,7 +115,7 @@ impl, K: Pod, V: Pod> PerCpuHashMap { values: PerCpuValues, flags: u64, ) -> Result<(), MapError> { - let fd = self.inner.borrow_mut().fd; + let fd = self.inner.borrow().fd; bpf_map_update_elem_per_cpu(fd, key.borrow(), &values, flags).map_err( |(_, io_error)| SyscallError { call: "bpf_map_update_elem", @@ -131,7 +128,7 @@ impl, K: Pod, V: Pod> PerCpuHashMap { /// Removes a key from the map. pub fn remove(&mut self, key: &K) -> Result<(), MapError> { - hash_map::remove(self.inner.borrow_mut(), key) + hash_map::remove(self.inner.borrow(), key) } } diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index dcdc443d..d2009414 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -1,8 +1,5 @@ //! A LPM Trie. -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_kv_size, IterableMap, MapData, MapError, MapIter, MapKeys}, @@ -147,7 +144,7 @@ impl, K: Pod, V: Pod> LpmTrie { } } -impl, K: Pod, V: Pod> LpmTrie { +impl, K: Pod, V: Pod> LpmTrie { /// Inserts a key value pair into the map. pub fn insert( &mut self, diff --git a/aya/src/maps/perf/async_perf_event_array.rs b/aya/src/maps/perf/async_perf_event_array.rs index 7c942e26..cc52e2dc 100644 --- a/aya/src/maps/perf/async_perf_event_array.rs +++ b/aya/src/maps/perf/async_perf_event_array.rs @@ -1,6 +1,6 @@ use bytes::BytesMut; use std::{ - borrow::{Borrow, BorrowMut}, + borrow::Borrow, os::fd::{AsRawFd as _, RawFd}, }; @@ -92,7 +92,7 @@ pub struct AsyncPerfEventArray { perf_map: PerfEventArray, } -impl + Borrow> AsyncPerfEventArray { +impl> AsyncPerfEventArray { /// Opens the perf buffer at the given index. /// /// The returned buffer will receive all the events eBPF programs send at the given index. @@ -141,7 +141,7 @@ pub struct AsyncPerfEventArrayBuffer { async_std_fd: Async, } -impl + Borrow> AsyncPerfEventArrayBuffer { +impl> AsyncPerfEventArrayBuffer { /// Reads events from the buffer. /// /// This method reads events into the provided slice of buffers, filling diff --git a/aya/src/maps/perf/perf_event_array.rs b/aya/src/maps/perf/perf_event_array.rs index bde255ed..075998c6 100644 --- a/aya/src/maps/perf/perf_event_array.rs +++ b/aya/src/maps/perf/perf_event_array.rs @@ -2,7 +2,7 @@ //! //! [`perf`]: https://perf.wiki.kernel.org/index.php/Main_Page. use std::{ - borrow::{Borrow, BorrowMut}, + borrow::Borrow, ops::Deref, os::fd::{AsRawFd, RawFd}, sync::Arc, @@ -31,7 +31,7 @@ pub struct PerfEventArrayBuffer { buf: PerfBuffer, } -impl + Borrow> PerfEventArrayBuffer { +impl> PerfEventArrayBuffer { /// Returns true if the buffer contains events that haven't been read. pub fn readable(&self) -> bool { self.buf.readable() @@ -55,7 +55,7 @@ impl + Borrow> PerfEventArrayBuffer { } } -impl + Borrow> AsRawFd for PerfEventArrayBuffer { +impl> AsRawFd for PerfEventArrayBuffer { fn as_raw_fd(&self) -> RawFd { self.buf.as_raw_fd() } @@ -84,14 +84,14 @@ impl + Borrow> AsRawFd for PerfEventArrayBuffer { _t: std::marker::PhantomData }; -/// # impl> Poll { +/// # impl> Poll { /// # fn poll_readable(&self) -> &mut [PerfEventArrayBuffer] { /// # &mut [] /// # } /// # } -/// # fn poll_buffers>(bufs: Vec>) -> Poll { +/// # fn poll_buffers>(bufs: Vec>) -> Poll { /// # Poll { _t: std::marker::PhantomData } /// # } /// # #[derive(thiserror::Error, Debug)] @@ -169,7 +169,7 @@ impl> PerfEventArray { } } -impl + Borrow> PerfEventArray { +impl> PerfEventArray { /// Opens the perf buffer at the given index. /// /// The returned buffer will receive all the events eBPF programs send at the given index. diff --git a/aya/src/maps/queue.rs b/aya/src/maps/queue.rs index 6eebbf01..88df360e 100644 --- a/aya/src/maps/queue.rs +++ b/aya/src/maps/queue.rs @@ -1,8 +1,5 @@ //! A FIFO queue. -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_kv_size, MapData, MapError}, @@ -52,7 +49,7 @@ impl, V: Pod> Queue { } } -impl, V: Pod> Queue { +impl, V: Pod> Queue { /// Removes the first element and returns it. /// /// # Errors diff --git a/aya/src/maps/sock/sock_hash.rs b/aya/src/maps/sock/sock_hash.rs index 503dcaae..e99ca71f 100644 --- a/aya/src/maps/sock/sock_hash.rs +++ b/aya/src/maps/sock/sock_hash.rs @@ -1,5 +1,5 @@ use std::{ - borrow::{Borrow, BorrowMut}, + borrow::Borrow, marker::PhantomData, os::fd::{AsRawFd, RawFd}, }; @@ -110,7 +110,7 @@ impl, K: Pod> SockHash { } } -impl, K: Pod> SockHash { +impl, K: Pod> SockHash { /// Inserts a socket under the given key. pub fn insert( &mut self, @@ -118,17 +118,12 @@ impl, K: Pod> SockHash { value: I, flags: u64, ) -> Result<(), MapError> { - hash_map::insert( - self.inner.borrow_mut(), - key.borrow(), - &value.as_raw_fd(), - flags, - ) + hash_map::insert(self.inner.borrow(), key.borrow(), &value.as_raw_fd(), flags) } /// Removes a socket from the map. pub fn remove(&mut self, key: &K) -> Result<(), MapError> { - hash_map::remove(self.inner.borrow_mut(), key) + hash_map::remove(self.inner.borrow(), key) } } diff --git a/aya/src/maps/sock/sock_map.rs b/aya/src/maps/sock/sock_map.rs index 8194cd71..54d5e014 100644 --- a/aya/src/maps/sock/sock_map.rs +++ b/aya/src/maps/sock/sock_map.rs @@ -1,7 +1,7 @@ //! An array of eBPF program file descriptors used as a jump table. use std::{ - borrow::{Borrow, BorrowMut}, + borrow::Borrow, os::fd::{AsRawFd, RawFd}, }; @@ -67,10 +67,10 @@ impl> SockMap { } } -impl> SockMap { +impl> SockMap { /// Stores a socket into the map. pub fn set(&mut self, index: u32, socket: &I, flags: u64) -> Result<(), MapError> { - let data = self.inner.borrow_mut(); + let data = self.inner.borrow(); let fd = data.fd; check_bounds(data, index)?; bpf_map_update_elem(fd, Some(&index), &socket.as_raw_fd(), flags).map_err( @@ -84,7 +84,7 @@ impl> SockMap { /// Removes the socket stored at `index` from the map. pub fn clear_index(&mut self, index: &u32) -> Result<(), MapError> { - let data = self.inner.borrow_mut(); + let data = self.inner.borrow(); let fd = data.fd; check_bounds(data, *index)?; bpf_map_delete_elem(fd, index) diff --git a/aya/src/maps/stack.rs b/aya/src/maps/stack.rs index c4afeebb..b16f4652 100644 --- a/aya/src/maps/stack.rs +++ b/aya/src/maps/stack.rs @@ -1,8 +1,5 @@ //! A LIFO stack. -use std::{ - borrow::{Borrow, BorrowMut}, - marker::PhantomData, -}; +use std::{borrow::Borrow, marker::PhantomData}; use crate::{ maps::{check_kv_size, MapData, MapError}, @@ -52,7 +49,7 @@ impl, V: Pod> Stack { } } -impl, V: Pod> Stack { +impl, V: Pod> Stack { /// Removes the last element and returns it. /// /// # Errors diff --git a/xtask/public-api/aya.txt b/xtask/public-api/aya.txt index 388024ce..47d9433c 100644 --- a/xtask/public-api/aya.txt +++ b/xtask/public-api/aya.txt @@ -11,7 +11,7 @@ impl, V: aya::Pod> aya::maps::array: pub fn aya::maps::array::Array::get(&self, index: &u32, flags: u64) -> core::result::Result pub fn aya::maps::array::Array::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::array::Array::len(&self) -> u32 -impl, V: aya::Pod> aya::maps::array::Array +impl, V: aya::Pod> aya::maps::array::Array pub fn aya::maps::array::Array::set(&mut self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::array::Array<&'a aya::maps::MapData, V> pub type aya::maps::array::Array<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -51,7 +51,7 @@ impl, V: aya::Pod> aya::maps::PerCpu pub fn aya::maps::PerCpuArray::get(&self, index: &u32, flags: u64) -> core::result::Result, aya::maps::MapError> pub fn aya::maps::PerCpuArray::iter(&self) -> impl core::iter::traits::iterator::Iterator, aya::maps::MapError>> + '_ pub fn aya::maps::PerCpuArray::len(&self) -> u32 -impl, V: aya::Pod> aya::maps::PerCpuArray +impl, V: aya::Pod> aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::set(&mut self, index: u32, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::PerCpuArray<&'a aya::maps::MapData, V> pub type aya::maps::PerCpuArray<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -88,10 +88,10 @@ impl core::convert::From for aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::from(t: T) -> T pub struct aya::maps::array::ProgramArray impl> aya::maps::ProgramArray -pub fn aya::maps::ProgramArray::indices(&self) -> aya::maps::MapKeys<'_, u32> -impl> aya::maps::ProgramArray pub fn aya::maps::ProgramArray::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::ProgramArray::set(&mut self, index: u32, program: &aya::programs::ProgramFd, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::ProgramArray +pub fn aya::maps::ProgramArray::indices(&self) -> aya::maps::MapKeys<'_, u32> impl core::convert::TryFrom for aya::maps::ProgramArray pub type aya::maps::ProgramArray::Error = aya::maps::MapError pub fn aya::maps::ProgramArray::try_from(map: aya::maps::Map) -> core::result::Result, aya::maps::MapError> @@ -126,7 +126,7 @@ pub mod aya::maps::bloom_filter pub struct aya::maps::bloom_filter::BloomFilter impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::contains(&self, value: &V, flags: u64) -> core::result::Result<(), aya::maps::MapError> -impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter +impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::insert(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V> pub type aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -166,7 +166,7 @@ impl, K: aya::Pod, V: aya::Pod> aya: pub fn aya::maps::hash_map::HashMap::get(&self, key: &K, flags: u64) -> core::result::Result pub fn aya::maps::hash_map::HashMap::iter(&self) -> aya::maps::MapIter<'_, K, V, Self> pub fn aya::maps::hash_map::HashMap::keys(&self) -> aya::maps::MapKeys<'_, K> -impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap pub fn aya::maps::hash_map::HashMap::insert(&mut self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::HashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod, K: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::HashMap<&'a aya::maps::MapData, V, K> @@ -209,7 +209,7 @@ impl, K: aya::Pod, V: aya::Pod> aya: pub fn aya::maps::hash_map::PerCpuHashMap::get(&self, key: &K, flags: u64) -> core::result::Result, aya::maps::MapError> pub fn aya::maps::hash_map::PerCpuHashMap::iter(&self) -> aya::maps::MapIter<'_, K, aya::maps::PerCpuValues, Self> pub fn aya::maps::hash_map::PerCpuHashMap::keys(&self) -> aya::maps::MapKeys<'_, K> -impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap pub fn aya::maps::hash_map::PerCpuHashMap::insert(&mut self, key: impl core::borrow::Borrow, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::PerCpuHashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod, K: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, V, K> @@ -288,7 +288,7 @@ impl, K: aya::Pod, V: aya::Pod> aya: pub fn aya::maps::lpm_trie::LpmTrie::get(&self, key: &aya::maps::lpm_trie::Key, flags: u64) -> core::result::Result pub fn aya::maps::lpm_trie::LpmTrie::iter(&self) -> aya::maps::MapIter<'_, aya::maps::lpm_trie::Key, V, Self> pub fn aya::maps::lpm_trie::LpmTrie::keys(&self) -> aya::maps::MapKeys<'_, aya::maps::lpm_trie::Key> -impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie +impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::insert(&mut self, key: &aya::maps::lpm_trie::Key, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::lpm_trie::LpmTrie::remove(&mut self, key: &aya::maps::lpm_trie::Key) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod, K: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, V, K> @@ -372,7 +372,7 @@ pub fn aya::maps::perf::PerfBufferError::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::PerfBufferError pub fn aya::maps::perf::PerfBufferError::from(t: T) -> T pub struct aya::maps::perf::AsyncPerfEventArray -impl + core::borrow::Borrow> aya::maps::perf::AsyncPerfEventArray +impl> aya::maps::perf::AsyncPerfEventArray pub fn aya::maps::perf::AsyncPerfEventArray::open(&mut self, index: u32, page_count: core::option::Option) -> core::result::Result, aya::maps::perf::PerfBufferError> impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray pub type aya::maps::perf::AsyncPerfEventArray::Error = aya::maps::MapError @@ -405,7 +405,7 @@ pub fn aya::maps::perf::AsyncPerfEventArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::AsyncPerfEventArray pub fn aya::maps::perf::AsyncPerfEventArray::from(t: T) -> T pub struct aya::maps::perf::AsyncPerfEventArrayBuffer -impl + core::borrow::Borrow> aya::maps::perf::AsyncPerfEventArrayBuffer +impl> aya::maps::perf::AsyncPerfEventArrayBuffer pub async fn aya::maps::perf::AsyncPerfEventArrayBuffer::read_events(&mut self, buffers: &mut [bytes::bytes_mut::BytesMut]) -> core::result::Result impl core::marker::Send for aya::maps::perf::AsyncPerfEventArrayBuffer where T: core::marker::Send + core::marker::Sync impl core::marker::Sync for aya::maps::perf::AsyncPerfEventArrayBuffer where T: core::marker::Send + core::marker::Sync @@ -460,7 +460,7 @@ pub fn aya::maps::perf::Events::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::Events pub fn aya::maps::perf::Events::from(t: T) -> T pub struct aya::maps::perf::PerfEventArray -impl + core::borrow::Borrow> aya::maps::perf::PerfEventArray +impl> aya::maps::perf::PerfEventArray pub fn aya::maps::perf::PerfEventArray::open(&mut self, index: u32, page_count: core::option::Option) -> core::result::Result, aya::maps::perf::PerfBufferError> impl core::convert::TryFrom for aya::maps::perf::PerfEventArray pub type aya::maps::perf::PerfEventArray::Error = aya::maps::MapError @@ -493,10 +493,10 @@ pub fn aya::maps::perf::PerfEventArray::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::perf::PerfEventArray pub fn aya::maps::perf::PerfEventArray::from(t: T) -> T pub struct aya::maps::perf::PerfEventArrayBuffer -impl + core::borrow::Borrow> aya::maps::perf::PerfEventArrayBuffer +impl> aya::maps::perf::PerfEventArrayBuffer pub fn aya::maps::perf::PerfEventArrayBuffer::read_events(&mut self, out_bufs: &mut [bytes::bytes_mut::BytesMut]) -> core::result::Result pub fn aya::maps::perf::PerfEventArrayBuffer::readable(&self) -> bool -impl + core::borrow::Borrow> std::os::fd::raw::AsRawFd for aya::maps::perf::PerfEventArrayBuffer +impl> std::os::fd::raw::AsRawFd for aya::maps::perf::PerfEventArrayBuffer pub fn aya::maps::perf::PerfEventArrayBuffer::as_raw_fd(&self) -> std::os::fd::raw::RawFd impl core::marker::Send for aya::maps::perf::PerfEventArrayBuffer where T: core::marker::Send + core::marker::Sync impl core::marker::Sync for aya::maps::perf::PerfEventArrayBuffer where T: core::marker::Send + core::marker::Sync @@ -523,7 +523,7 @@ pub mod aya::maps::queue pub struct aya::maps::queue::Queue impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::capacity(&self) -> u32 -impl, V: aya::Pod> aya::maps::queue::Queue +impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::queue::Queue::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::queue::Queue<&'a aya::maps::MapData, V> @@ -563,7 +563,7 @@ pub fn aya::maps::SockHash::fd(&self) -> core::result::Result::get(&self, key: &K, flags: u64) -> core::result::Result pub fn aya::maps::SockHash::iter(&self) -> aya::maps::MapIter<'_, K, std::os::fd::raw::RawFd, Self> pub fn aya::maps::SockHash::keys(&self) -> aya::maps::MapKeys<'_, K> -impl, K: aya::Pod> aya::maps::SockHash +impl, K: aya::Pod> aya::maps::SockHash pub fn aya::maps::SockHash::insert(&mut self, key: impl core::borrow::Borrow, value: I, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockHash::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::SockHash<&'a aya::maps::MapData, V> @@ -601,11 +601,11 @@ impl core::convert::From for aya::maps::SockHash pub fn aya::maps::SockHash::from(t: T) -> T pub struct aya::maps::sock::SockMap impl> aya::maps::SockMap -pub fn aya::maps::SockMap::fd(&self) -> core::result::Result -pub fn aya::maps::SockMap::indices(&self) -> aya::maps::MapKeys<'_, u32> -impl> aya::maps::SockMap pub fn aya::maps::SockMap::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockMap::set(&mut self, index: u32, socket: &I, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::SockMap +pub fn aya::maps::SockMap::fd(&self) -> core::result::Result +pub fn aya::maps::SockMap::indices(&self) -> aya::maps::MapKeys<'_, u32> impl core::convert::TryFrom for aya::maps::SockMap pub type aya::maps::SockMap::Error = aya::maps::MapError pub fn aya::maps::SockMap::try_from(map: aya::maps::Map) -> core::result::Result, aya::maps::MapError> @@ -671,7 +671,7 @@ pub mod aya::maps::stack pub struct aya::maps::stack::Stack impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::capacity(&self) -> u32 -impl, V: aya::Pod> aya::maps::stack::Stack +impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::stack::Stack::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::stack::Stack<&'a aya::maps::MapData, V> @@ -1031,7 +1031,7 @@ impl, V: aya::Pod> aya::maps::array: pub fn aya::maps::array::Array::get(&self, index: &u32, flags: u64) -> core::result::Result pub fn aya::maps::array::Array::iter(&self) -> impl core::iter::traits::iterator::Iterator> + '_ pub fn aya::maps::array::Array::len(&self) -> u32 -impl, V: aya::Pod> aya::maps::array::Array +impl, V: aya::Pod> aya::maps::array::Array pub fn aya::maps::array::Array::set(&mut self, index: u32, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::array::Array<&'a aya::maps::MapData, V> pub type aya::maps::array::Array<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -1067,7 +1067,7 @@ pub fn aya::maps::array::Array::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::array::Array pub fn aya::maps::array::Array::from(t: T) -> T pub struct aya::maps::AsyncPerfEventArray -impl + core::borrow::Borrow> aya::maps::perf::AsyncPerfEventArray +impl> aya::maps::perf::AsyncPerfEventArray pub fn aya::maps::perf::AsyncPerfEventArray::open(&mut self, index: u32, page_count: core::option::Option) -> core::result::Result, aya::maps::perf::PerfBufferError> impl core::convert::TryFrom for aya::maps::perf::AsyncPerfEventArray pub type aya::maps::perf::AsyncPerfEventArray::Error = aya::maps::MapError @@ -1102,7 +1102,7 @@ pub fn aya::maps::perf::AsyncPerfEventArray::from(t: T) -> T pub struct aya::maps::BloomFilter impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::contains(&self, value: &V, flags: u64) -> core::result::Result<(), aya::maps::MapError> -impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter +impl, V: aya::Pod> aya::maps::bloom_filter::BloomFilter pub fn aya::maps::bloom_filter::BloomFilter::insert(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V> pub type aya::maps::bloom_filter::BloomFilter<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -1141,7 +1141,7 @@ impl, K: aya::Pod, V: aya::Pod> aya: pub fn aya::maps::hash_map::HashMap::get(&self, key: &K, flags: u64) -> core::result::Result pub fn aya::maps::hash_map::HashMap::iter(&self) -> aya::maps::MapIter<'_, K, V, Self> pub fn aya::maps::hash_map::HashMap::keys(&self) -> aya::maps::MapKeys<'_, K> -impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::HashMap pub fn aya::maps::hash_map::HashMap::insert(&mut self, key: impl core::borrow::Borrow, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::HashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod, K: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::HashMap<&'a aya::maps::MapData, V, K> @@ -1184,7 +1184,7 @@ impl, K: aya::Pod, V: aya::Pod> aya: pub fn aya::maps::lpm_trie::LpmTrie::get(&self, key: &aya::maps::lpm_trie::Key, flags: u64) -> core::result::Result pub fn aya::maps::lpm_trie::LpmTrie::iter(&self) -> aya::maps::MapIter<'_, aya::maps::lpm_trie::Key, V, Self> pub fn aya::maps::lpm_trie::LpmTrie::keys(&self) -> aya::maps::MapKeys<'_, aya::maps::lpm_trie::Key> -impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie +impl, K: aya::Pod, V: aya::Pod> aya::maps::lpm_trie::LpmTrie pub fn aya::maps::lpm_trie::LpmTrie::insert(&mut self, key: &aya::maps::lpm_trie::Key, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::lpm_trie::LpmTrie::remove(&mut self, key: &aya::maps::lpm_trie::Key) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod, K: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::lpm_trie::LpmTrie<&'a aya::maps::MapData, V, K> @@ -1347,7 +1347,7 @@ impl, V: aya::Pod> aya::maps::PerCpu pub fn aya::maps::PerCpuArray::get(&self, index: &u32, flags: u64) -> core::result::Result, aya::maps::MapError> pub fn aya::maps::PerCpuArray::iter(&self) -> impl core::iter::traits::iterator::Iterator, aya::maps::MapError>> + '_ pub fn aya::maps::PerCpuArray::len(&self) -> u32 -impl, V: aya::Pod> aya::maps::PerCpuArray +impl, V: aya::Pod> aya::maps::PerCpuArray pub fn aya::maps::PerCpuArray::set(&mut self, index: u32, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::PerCpuArray<&'a aya::maps::MapData, V> pub type aya::maps::PerCpuArray<&'a aya::maps::MapData, V>::Error = aya::maps::MapError @@ -1387,7 +1387,7 @@ impl, K: aya::Pod, V: aya::Pod> aya: pub fn aya::maps::hash_map::PerCpuHashMap::get(&self, key: &K, flags: u64) -> core::result::Result, aya::maps::MapError> pub fn aya::maps::hash_map::PerCpuHashMap::iter(&self) -> aya::maps::MapIter<'_, K, aya::maps::PerCpuValues, Self> pub fn aya::maps::hash_map::PerCpuHashMap::keys(&self) -> aya::maps::MapKeys<'_, K> -impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap +impl, K: aya::Pod, V: aya::Pod> aya::maps::hash_map::PerCpuHashMap pub fn aya::maps::hash_map::PerCpuHashMap::insert(&mut self, key: impl core::borrow::Borrow, values: aya::maps::PerCpuValues, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::hash_map::PerCpuHashMap::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod, K: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::hash_map::PerCpuHashMap<&'a aya::maps::MapData, V, K> @@ -1460,7 +1460,7 @@ pub fn aya::maps::PerCpuValues::borrow_mut(&mut self) -> &mut T impl core::convert::From for aya::maps::PerCpuValues pub fn aya::maps::PerCpuValues::from(t: T) -> T pub struct aya::maps::PerfEventArray -impl + core::borrow::Borrow> aya::maps::perf::PerfEventArray +impl> aya::maps::perf::PerfEventArray pub fn aya::maps::perf::PerfEventArray::open(&mut self, index: u32, page_count: core::option::Option) -> core::result::Result, aya::maps::perf::PerfBufferError> impl core::convert::TryFrom for aya::maps::perf::PerfEventArray pub type aya::maps::perf::PerfEventArray::Error = aya::maps::MapError @@ -1494,10 +1494,10 @@ impl core::convert::From for aya::maps::perf::PerfEventArray pub fn aya::maps::perf::PerfEventArray::from(t: T) -> T pub struct aya::maps::ProgramArray impl> aya::maps::ProgramArray -pub fn aya::maps::ProgramArray::indices(&self) -> aya::maps::MapKeys<'_, u32> -impl> aya::maps::ProgramArray pub fn aya::maps::ProgramArray::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::ProgramArray::set(&mut self, index: u32, program: &aya::programs::ProgramFd, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::ProgramArray +pub fn aya::maps::ProgramArray::indices(&self) -> aya::maps::MapKeys<'_, u32> impl core::convert::TryFrom for aya::maps::ProgramArray pub type aya::maps::ProgramArray::Error = aya::maps::MapError pub fn aya::maps::ProgramArray::try_from(map: aya::maps::Map) -> core::result::Result, aya::maps::MapError> @@ -1531,7 +1531,7 @@ pub fn aya::maps::ProgramArray::from(t: T) -> T pub struct aya::maps::Queue impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::capacity(&self) -> u32 -impl, V: aya::Pod> aya::maps::queue::Queue +impl, V: aya::Pod> aya::maps::queue::Queue pub fn aya::maps::queue::Queue::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::queue::Queue::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::queue::Queue<&'a aya::maps::MapData, V> @@ -1570,7 +1570,7 @@ pub fn aya::maps::SockHash::fd(&self) -> core::result::Result::get(&self, key: &K, flags: u64) -> core::result::Result pub fn aya::maps::SockHash::iter(&self) -> aya::maps::MapIter<'_, K, std::os::fd::raw::RawFd, Self> pub fn aya::maps::SockHash::keys(&self) -> aya::maps::MapKeys<'_, K> -impl, K: aya::Pod> aya::maps::SockHash +impl, K: aya::Pod> aya::maps::SockHash pub fn aya::maps::SockHash::insert(&mut self, key: impl core::borrow::Borrow, value: I, flags: u64) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockHash::remove(&mut self, key: &K) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::SockHash<&'a aya::maps::MapData, V> @@ -1608,11 +1608,11 @@ impl core::convert::From for aya::maps::SockHash pub fn aya::maps::SockHash::from(t: T) -> T pub struct aya::maps::SockMap impl> aya::maps::SockMap -pub fn aya::maps::SockMap::fd(&self) -> core::result::Result -pub fn aya::maps::SockMap::indices(&self) -> aya::maps::MapKeys<'_, u32> -impl> aya::maps::SockMap pub fn aya::maps::SockMap::clear_index(&mut self, index: &u32) -> core::result::Result<(), aya::maps::MapError> pub fn aya::maps::SockMap::set(&mut self, index: u32, socket: &I, flags: u64) -> core::result::Result<(), aya::maps::MapError> +impl> aya::maps::SockMap +pub fn aya::maps::SockMap::fd(&self) -> core::result::Result +pub fn aya::maps::SockMap::indices(&self) -> aya::maps::MapKeys<'_, u32> impl core::convert::TryFrom for aya::maps::SockMap pub type aya::maps::SockMap::Error = aya::maps::MapError pub fn aya::maps::SockMap::try_from(map: aya::maps::Map) -> core::result::Result, aya::maps::MapError> @@ -1646,7 +1646,7 @@ pub fn aya::maps::SockMap::from(t: T) -> T pub struct aya::maps::Stack impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::capacity(&self) -> u32 -impl, V: aya::Pod> aya::maps::stack::Stack +impl, V: aya::Pod> aya::maps::stack::Stack pub fn aya::maps::stack::Stack::pop(&mut self, flags: u64) -> core::result::Result pub fn aya::maps::stack::Stack::push(&mut self, value: impl core::borrow::Borrow, flags: u64) -> core::result::Result<(), aya::maps::MapError> impl<'a, V: aya::Pod> core::convert::TryFrom<&'a aya::maps::Map> for aya::maps::stack::Stack<&'a aya::maps::MapData, V>