#[non_exhaustive]#[repr(u32)]pub enum MapType {
Show 31 variants
Unspec = 0,
Hash = 1,
Array = 2,
ProgArray = 3,
PerfEventArray = 4,
PerCpuHash = 5,
PerCpuArray = 6,
StackTrace = 7,
CgroupArray = 8,
LruHash = 9,
LruPerCpuHash = 10,
LpmTrie = 11,
ArrayOfMaps = 12,
HashOfMaps = 13,
DevMap = 14,
SockMap = 15,
CpuMap = 16,
XskMap = 17,
SockHash = 18,
CgroupStorage = 19,
ReusePortSockArray = 20,
PerCpuCgroupStorage = 21,
Queue = 22,
Stack = 23,
SkStorage = 24,
DevMapHash = 25,
StructOps = 26,
RingBuf = 27,
InodeStorage = 28,
TaskStorage = 29,
BloomFilter = 30,
}
Expand description
eBPF map type variants. Based off of kernel header’s
enum bpf_map_type
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unspec = 0
Hash = 1
Array = 2
ProgArray = 3
PerfEventArray = 4
PerCpuHash = 5
PerCpuArray = 6
StackTrace = 7
CgroupArray = 8
LruHash = 9
LruPerCpuHash = 10
LpmTrie = 11
ArrayOfMaps = 12
HashOfMaps = 13
DevMap = 14
SockMap = 15
CpuMap = 16
XskMap = 17
SockHash = 18
CgroupStorage = 19
ReusePortSockArray = 20
PerCpuCgroupStorage = 21
Queue = 22
Stack = 23
SkStorage = 24
DevMapHash = 25
StructOps = 26
RingBuf = 27
InodeStorage = 28
TaskStorage = 29
BloomFilter = 30
Implementations§
Source§impl MapType
impl MapType
Sourcepub fn probe(&self) -> Result<bool, Error>
pub fn probe(&self) -> Result<bool, Error>
Determines if the eBPF map type is supported on the current platform
Sourcepub fn iter() -> impl Iterator<Item = MapType>
pub fn iter() -> impl Iterator<Item = MapType>
Returns an ordered iterator over the MapType variants. The order is determined by the kernel header’s enum values.
Note: Skips MapType::Unspec
since it’s an invalid map type
Trait Implementations§
Source§impl TryFromPrimitive for MapType
impl TryFromPrimitive for MapType
impl Copy for MapType
impl Eq for MapType
impl StructuralPartialEq for MapType
Auto Trait Implementations§
impl Freeze for MapType
impl RefUnwindSafe for MapType
impl Send for MapType
impl Sync for MapType
impl Unpin for MapType
impl UnwindSafe for MapType
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