#[non_exhaustive]#[repr(u32)]pub enum MapType {
Show 32 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,
Unknown = 4_294_967_295,
}
Expand description
Type of a Map
. Maps to enum bpf_map_type
in kernel uapi.
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
Unknown = 4_294_967_295
We choose to specify our own “unknown” type here b/c it’s really up to the kernel to decide if it wants to reject the map. If it accepts it, it just means whoever using this library is a bit out of date.
Implementations§
Trait Implementations§
source§impl PartialEq for MapType
impl PartialEq for MapType
source§impl TryFrom<u32> for MapType
impl TryFrom<u32> for MapType
§type Error = TryFromPrimitiveError<MapType>
type Error = TryFromPrimitiveError<MapType>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for MapType
impl TryFromPrimitive for MapType
impl Copy for MapType
impl Eq for MapType
impl StructuralEq for MapType
impl StructuralPartialEq for MapType
Auto Trait Implementations§
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