pub struct MapInfo(/* private fields */);Expand description
Provides Provides metadata information about a loaded eBPF map.
Introduced in kernel v4.13.
Implementations§
Source§impl MapInfo
impl MapInfo
Sourcepub fn from_id(id: u32) -> Result<Self, MapError>
pub fn from_id(id: u32) -> Result<Self, MapError>
Loads map info from a map ID.
Uses kernel v4.13 features.
Sourcepub fn map_type(&self) -> Result<MapType, MapError>
pub fn map_type(&self) -> Result<MapType, MapError>
The type of map.
Introduced in kernel v4.13.
Sourcepub const fn key_size(&self) -> u32
pub const fn key_size(&self) -> u32
The key size for this map in bytes.
Introduced in kernel v4.13.
Sourcepub const fn value_size(&self) -> u32
pub const fn value_size(&self) -> u32
The value size for this map in bytes.
Introduced in kernel v4.13.
Sourcepub const fn max_entries(&self) -> u32
pub const fn max_entries(&self) -> u32
The maximum number of entries in this map.
Introduced in kernel v4.13.
Sourcepub const fn map_flags(&self) -> u32
pub const fn map_flags(&self) -> u32
The flags used in loading this map.
Introduced in kernel v4.13.
Sourcepub fn name(&self) -> &[u8] ⓘ
pub fn name(&self) -> &[u8] ⓘ
The name of the map, limited to 16 bytes.
Introduced in kernel v4.15.
Sourcepub fn name_as_str(&self) -> Option<&str>
pub fn name_as_str(&self) -> Option<&str>
The name of the map as a &str.
None is returned if the name was not valid unicode or if field is not available.
Introduced in kernel v4.15.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MapInfo
impl RefUnwindSafe for MapInfo
impl Send for MapInfo
impl Sync for MapInfo
impl Unpin for MapInfo
impl UnsafeUnpin for MapInfo
impl UnwindSafe for MapInfo
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