pub struct MapImpl<'obj, T = ()> { /* private fields */ }
Expand description
Represents a libbpf-created map.
Some methods require working with raw bytes. You may find libraries such as
plain
helpful.
Implementations§
Trait Implementations§
Source§impl<T> AsFd for MapImpl<'_, T>
impl<T> AsFd for MapImpl<'_, T>
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl<T> MapCore for MapImpl<'_, T>where
T: Debug,
impl<T> MapCore for MapImpl<'_, T>where
T: Debug,
Source§fn value_size(&self) -> u32
fn value_size(&self) -> u32
Retrieve the size of the map’s values.
Source§fn lookup_bloom_filter(&self, value: &[u8]) -> Result<bool>
fn lookup_bloom_filter(&self, value: &[u8]) -> Result<bool>
Returns if the given value is likely present in bloom_filter as
bool
. Read moreSource§fn delete_batch(
&self,
keys: &[u8],
count: u32,
elem_flags: MapFlags,
flags: MapFlags,
) -> Result<()>
fn delete_batch( &self, keys: &[u8], count: u32, elem_flags: MapFlags, flags: MapFlags, ) -> Result<()>
Deletes many elements in batch mode from the map. Read more
Source§fn lookup_and_delete(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
fn lookup_and_delete(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
Same as
Self::lookup()
except this also deletes the key from the map. Read moreSource§fn update(&self, key: &[u8], value: &[u8], flags: MapFlags) -> Result<()>
fn update(&self, key: &[u8], value: &[u8], flags: MapFlags) -> Result<()>
Update an element. Read more
Auto Trait Implementations§
impl<'obj, T> Freeze for MapImpl<'obj, T>
impl<'obj, T> RefUnwindSafe for MapImpl<'obj, T>where
T: RefUnwindSafe,
impl<'obj, T = ()> !Send for MapImpl<'obj, T>
impl<'obj, T = ()> !Sync for MapImpl<'obj, T>
impl<'obj, T> Unpin for MapImpl<'obj, T>
impl<'obj, T> UnwindSafe for MapImpl<'obj, T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more