pub enum Map {
Legacy(LegacyMap),
Btf(BtfMap),
}
Expand description
Map data defined in maps
or .maps
sections
Variants§
Implementations§
Source§impl Map
impl Map
Sourcepub fn value_size(&self) -> u32
pub fn value_size(&self) -> u32
Returns the value size in bytes
Sourcepub fn set_value_size(&mut self, size: u32)
pub fn set_value_size(&mut self, size: u32)
Set the value size in bytes
Sourcepub fn max_entries(&self) -> u32
pub fn max_entries(&self) -> u32
Returns the max entry number
Sourcepub fn set_max_entries(&mut self, v: u32)
pub fn set_max_entries(&mut self, v: u32)
Sets the max entry number
Sourcepub fn pinning(&self) -> PinningType
pub fn pinning(&self) -> PinningType
Returns the pinning type of the map
Sourcepub fn section_index(&self) -> usize
pub fn section_index(&self) -> usize
Returns the section index
Sourcepub fn section_kind(&self) -> EbpfSectionKind
pub fn section_kind(&self) -> EbpfSectionKind
Returns the section kind.
Sourcepub fn symbol_index(&self) -> Option<usize>
pub fn symbol_index(&self) -> Option<usize>
Returns the symbol index.
This is None
for data maps (.bss, .data and .rodata) since those don’t
need symbols in order to be relocated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
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